Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Commit

Permalink
adding a test case for the explicit returns
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Mar 25, 2010
1 parent ecd1c77 commit c8f969b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_returns.coffee
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit c8f969b

Please sign in to comment.