1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

adding a pattern-matching-on-expression test

This commit is contained in:
Jeremy Ashkenas 2010-03-19 22:48:55 -04:00
parent 92688c89ef
commit 69911209ea

View file

@ -72,4 +72,10 @@ test: {
{person: {address: [ignore, addr...]}}: test
ok addr.join(', ') is "Street 101, Apt 101, City 101"
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