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

added a test for the multiple-functions-passed-sans-parens

This commit is contained in:
Jeremy Ashkenas 2010-04-30 23:20:22 -04:00
parent 3b264c9572
commit 1a97f599dd

View file

@ -148,3 +148,12 @@ ok result is 10
# More paren compilation tests:
reverse: (obj) -> obj.reverse()
ok reverse([1, 2].concat 3).join(' ') is '3 2 1'
# Passing multiple functions without paren-wrapping is legal, and should compile.
sum: (one, two) -> one() + two()
result: sum ->
7 + 9
, ->
1 + 3
ok result is 20