From c8f969b4a2aaf8ef9d92d03b448a887e230994f9 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Thu, 25 Mar 2010 18:54:17 -0400 Subject: [PATCH] adding a test case for the explicit returns --- test/test_returns.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/test_returns.coffee diff --git a/test/test_returns.coffee b/test/test_returns.coffee new file mode 100644 index 0000000000..c4a8f7b2c6 --- /dev/null +++ b/test/test_returns.coffee @@ -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' \ No newline at end of file