mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-11 08:05:02 -05:00
adding a test case for the explicit returns
This commit is contained in:
12
test/test_returns.coffee
Normal file
12
test/test_returns.coffee
Normal 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'
|
||||
Reference in New Issue
Block a user