From e4a719344f2d3bf6008d15949baf60fa68420135 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 14 Jul 2022 17:39:58 +0800 Subject: add spec. --- spec/inputs/switch.yue | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'spec/inputs/switch.yue') 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 do tb = {} + switch tb when {:a = 1, :b = 2} print a, b + switch tb + when {:a, :b = 2} + print "partially matched", a, b + + switch tb + when {:a, :b} + print a, b + else + print "not matched" do tb = x: "abc" switch tb -- cgit v1.2.3-55-g6feb