From 69911209ea29aa8a138438466a341103732cf5ca Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Fri, 19 Mar 2010 22:48:55 -0400 Subject: [PATCH] adding a pattern-matching-on-expression test --- test/test_pattern_matching.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test_pattern_matching.coffee b/test/test_pattern_matching.coffee index 856c9e78..46b8428a 100644 --- a/test/test_pattern_matching.coffee +++ b/test/test_pattern_matching.coffee @@ -72,4 +72,10 @@ test: { {person: {address: [ignore, addr...]}}: test -ok addr.join(', ') is "Street 101, Apt 101, City 101" \ No newline at end of file +ok addr.join(', ') is "Street 101, Apt 101, City 101" + + +[a, b]: if true then [2, 1] else [1, 2] + +ok a is 2 +ok b is 1