-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathcommand.yml
224 lines (222 loc) · 5.94 KB
/
command.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
name: Tremor Unified Client acceptance tests
tags:
- cli
- acceptance
suites:
- name: Calling cli with no args gets help / version information
cases:
- name: |
`tremor` no args returns help
command: tremor
tags:
- help
status: 2
expects:
- source: stderr
contains:
- Usage
- Options
- Commands
- name: |
`tremor -h` returns help
command: tremor -h
tags:
- help
status: 0
expects:
- source: stdout
contains:
- Usage
- Options
- Commands
- name: |
`tremor help` returns help
command: tremor -h
tags:
- help
status: 0
expects:
- source: stdout
contains:
- Usage
- Options
- Commands
- name: |
`tremor --help` returns help
command: tremor --help
tags:
- help
status: 0
expects:
- source: stdout
contains:
- Usage
- Options
- Commands
- completions
- dbg
- doc
- help
- run
- server
- test
- name: |
`tremor -V` returns version
command: tremor -V
tags:
- version
status: 0
expects:
- source: stdout
contains:
- tremor
- name: |
`tremor --version` returns version
command: tremor --version
tags:
- version
status: 0
expects:
- source: stdout
contains:
- tremor
- name: Calling cli with no args gets help and basic top level usage
cases:
- name: |
`tremor completions` returns help for completions
command: tremor help completions
tags:
- completions
- shell
- help
status: 0
expects:
- source: stdout
contains:
- bash
- elvish
- fish
- powershell
- zsh
- name: |
`tremor completions bash` returns bash completions
command: tremor completions bash
tags:
- completions
- shell
- bash
status: 0
expects:
- source: stdout
contains:
- _tremor() {
- name: |
`tremor completions elvish` returns elvish completions
command: tremor completions elvish
tags:
- completions
- shell
- elvish
status: 0
expects:
- source: stdout
contains:
- edit:completion:arg-completer[tremor]
- name: |
`tremor completions fish` returns fish completions
command: tremor completions fish
tags:
- completions
- shell
- fish
status: 0
expects:
- source: stdout
contains:
- complete -c tremor -n "__fish_use_subcommand"
- name: |
`tremor completions powershell` returns powershell completions
command: tremor completions powershell
tags:
- completions
- shell
- powershell
status: 0
expects:
- source: stdout
contains:
- using namespace System.Management.Automation
- using namespace System.Management.Automation.Language
- name: |
`tremor completions zsh` returns zsh completions
command: tremor completions zsh
tags:
- completions
- shell
- zsh
- bug
status: 0
expects:
- source: stdout
contains:
- "#compdef tremor"
- name: Calling `run` shows hygienic errors
cases:
- name: Running a tremor script shows hygienic runtime error
command: tremor run data/script_with_error.tremor -i data/input.json
tags:
- run
- script
status: 0
expects:
- source: stderr
contains:
- "Error in data/script_with_error.tremor:3:34"
- "3 | let trimmed = string::trim(event.foo);"
- " | ^^^ Trying to access a non existing event key `foo`"
- name: Running a trickle query shows hygienic runtime error
command: tremor run data/query_with_error.trickle -i data/input.json
tags:
- run
- query
status: 0
expects:
- source: stderr
contains:
- "Error in data/query_with_error.trickle:1:14"
- "1 | select event.foo from in into out;"
- " | ^^^ Trying to access a non existing event key `foo`"
- name: Running a trickle query shows a hygienic runtime error caused in embedded script
command: tremor run data/query_with_script_with_error.trickle -i data/input.json --encoder string
tags:
- run
- query
- script
status: 0
expects:
- source: stdout
contains:
- "Error:"
- "3 | emit event.baz"
- " | ^^^ Trying to access a non existing event key `baz`\n\n"
- name: setup for tremor new creates
command: rm -rf test
tags:
- run
- new
status: 0
expects:
- source: stdout
is_empty: true
- source: stderr
is_empty: true
- name: tremor new creates
command: tremor new test
tags:
- run
- new
status: 0
expects:
- source: stdout
contains:
- "test/main.troy"