adding a test case for the explicit returns

This commit is contained in:
Jeremy Ashkenas 2010-03-25 18:54:17 -04:00
parent ecd1c77f48
commit c8f969b4a2
1 changed files with 12 additions and 0 deletions

12
test/test_returns.coffee Normal file
View File

@ -0,0 +1,12 @@
first: ->
return 'do' for x in [1,2,3]
second: ->
return ['re' for x in [1,2,3]]
third: ->
return ('mi' for x in [1,2,3])
ok first().join(' ') is 'do do do'
ok second()[0].join(' ') is 're re re'
ok third().join(' ') is 'mi mi mi'