diff options
Diffstat (limited to 'spec/inputs')
-rw-r--r-- | spec/inputs/switch.yue | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/inputs/switch.yue b/spec/inputs/switch.yue index 08330bf..442d15f 100644 --- a/spec/inputs/switch.yue +++ b/spec/inputs/switch.yue | |||
@@ -108,10 +108,20 @@ do | |||
108 | 108 | ||
109 | do | 109 | do |
110 | tb = {} | 110 | tb = {} |
111 | |||
111 | switch tb | 112 | switch tb |
112 | when {:a = 1, :b = 2} | 113 | when {:a = 1, :b = 2} |
113 | print a, b | 114 | print a, b |
114 | 115 | ||
116 | switch tb | ||
117 | when {:a, :b = 2} | ||
118 | print "partially matched", a, b | ||
119 | |||
120 | switch tb | ||
121 | when {:a, :b} | ||
122 | print a, b | ||
123 | else | ||
124 | print "not matched" | ||
115 | do | 125 | do |
116 | tb = x: "abc" | 126 | tb = x: "abc" |
117 | switch tb | 127 | switch tb |