aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/switch.yue14
-rw-r--r--spec/inputs/whitespace.yue47
2 files changed, 61 insertions, 0 deletions
diff --git a/spec/inputs/switch.yue b/spec/inputs/switch.yue
index 2b0669c..b969a17 100644
--- a/spec/inputs/switch.yue
+++ b/spec/inputs/switch.yue
@@ -289,4 +289,18 @@ do
289 289
290 handlePath ["admin", "logs", "view"] 290 handlePath ["admin", "logs", "view"]
291 291
292do
293 _check_cond_expr = (iftyp, n, args) ->
294 sw = { ct: iftyp, op: op }
295 why = switch sw
296 -- woo
297 when ct: 'if', op: '=='
298 'never'
299 when ct: 'if', op: '!='
300 'always'
301 when ct: 'unless', op: '=='
302 'always'
303 when ct: 'unless', op: '!='
304 'never'
305
292nil 306nil
diff --git a/spec/inputs/whitespace.yue b/spec/inputs/whitespace.yue
index a999143..d0acdde 100644
--- a/spec/inputs/whitespace.yue
+++ b/spec/inputs/whitespace.yue
@@ -198,5 +198,52 @@ do
198 -- two 198 -- two
199 b: -> -- 2 199 b: -> -- 2
200 200
201do
202 tb = {
203
204 -- hello
205 print 123
206 -- abc
207
208
209
210
211
212
213
214 abc: 1
215
216
217 -- xyz
218 c: ""
219
220
221 z: 998
222
223 <close>: ->
224
225 -- hello
226 <eq>: ->
227 --[[OK]] --[[OK]]--good
228 <call>: ->
229 }
230
231 class CY
232 -- init xa
233 xa = 1
234 -- init xb
235 local xb = 2
236
237 -- new
238 new: => print xa, xb, xc, xd
239
240
241 -- init xc
242 const xc = 3
243
244 -- wait
245
246 -- init xd
247 close xd = <close>: =>
201 248
202nil 249nil