mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 11:01:25 -05:00
fixing improperly-formatted-output of pattern matching within comprehension arguments.
This commit is contained in:
31
test/test_try_catch.coffee
Normal file
31
test/test_try_catch.coffee
Normal file
@@ -0,0 +1,31 @@
|
||||
# Basic exception throwing.
|
||||
block: -> (throw 'up')
|
||||
throws block, 'up'
|
||||
|
||||
|
||||
# Basic try/catch.
|
||||
result: try
|
||||
10
|
||||
finally
|
||||
15
|
||||
|
||||
ok result is 10
|
||||
|
||||
result: try
|
||||
throw 'up'
|
||||
catch err
|
||||
err.length
|
||||
|
||||
ok result is 2
|
||||
|
||||
|
||||
result: try throw 'error' catch err then err.length
|
||||
|
||||
ok result is 5
|
||||
|
||||
|
||||
# try/catch with empty clauses still compiles.
|
||||
try
|
||||
# nothing
|
||||
catch err
|
||||
#nothing
|
||||
Reference in New Issue
Block a user