diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-01-18 18:15:24 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-01-18 18:15:24 +0800 |
| commit | 8d1af508f4173e4af6a4ea98584c1a86619f6a20 (patch) | |
| tree | 0264c4b01f1152d8114cf46aea6fd773276c0b01 /spec/inputs/switch.moon | |
| parent | f53ccb373efbf6f6f40284111df309e351c2c18f (diff) | |
| download | yuescript-8d1af508f4173e4af6a4ea98584c1a86619f6a20.tar.gz yuescript-8d1af508f4173e4af6a4ea98584c1a86619f6a20.tar.bz2 yuescript-8d1af508f4173e4af6a4ea98584c1a86619f6a20.zip | |
fix Moonscript issue 122, add support for ? operator.
Diffstat (limited to 'spec/inputs/switch.moon')
| -rw-r--r-- | spec/inputs/switch.moon | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/inputs/switch.moon b/spec/inputs/switch.moon index 3bc179b..a028f98 100644 --- a/spec/inputs/switch.moon +++ b/spec/inputs/switch.moon | |||
| @@ -15,7 +15,7 @@ switch value | |||
| 15 | when "cool" | 15 | when "cool" |
| 16 | print "hello world" | 16 | print "hello world" |
| 17 | when "yeah" | 17 | when "yeah" |
| 18 | [[FFFF]] + [[MMMM]] | 18 | _ = [[FFFF]] + [[MMMM]] |
| 19 | when 2323 + 32434 | 19 | when 2323 + 32434 |
| 20 | print "okay" | 20 | print "okay" |
| 21 | else | 21 | else |
| @@ -33,9 +33,9 @@ out = switch value | |||
| 33 | with something | 33 | with something |
| 34 | switch \value! | 34 | switch \value! |
| 35 | when .okay | 35 | when .okay |
| 36 | "world" | 36 | _ = "world" |
| 37 | else | 37 | else |
| 38 | "yesh" | 38 | _ = "yesh" |
| 39 | 39 | ||
| 40 | fix this | 40 | fix this |
| 41 | call_func switch something | 41 | call_func switch something |
| @@ -46,7 +46,7 @@ call_func switch something | |||
| 46 | 46 | ||
| 47 | switch hi | 47 | switch hi |
| 48 | when hello or world | 48 | when hello or world |
| 49 | greene | 49 | _ = greene |
| 50 | 50 | ||
| 51 | -- | 51 | -- |
| 52 | 52 | ||
| @@ -54,7 +54,7 @@ switch hi | |||
| 54 | when "one", "two" | 54 | when "one", "two" |
| 55 | print "cool" | 55 | print "cool" |
| 56 | when "dad" | 56 | when "dad" |
| 57 | no | 57 | _ = no |
| 58 | 58 | ||
| 59 | switch hi | 59 | switch hi |
| 60 | when 3+1, hello!, (-> 4)! | 60 | when 3+1, hello!, (-> 4)! |
