added try-catch around script eval so that errors that are NOT inside

`test` calls (or syntax errors) are caught, and the test suite can
continue on
This commit is contained in:
Michael Ficarra
2010-12-12 18:34:44 -05:00
parent a19ea4b662
commit 5de43fca4e

View File

@@ -192,7 +192,10 @@ runTests = (CoffeeScript) ->
fileName = path.join 'test', file
fs.readFile fileName, (err, code) ->
currentFile = fileName
CoffeeScript.run code.toString(), {fileName}
try
CoffeeScript.run code.toString(), {fileName}
catch e
failures.push file: currentFile, error: e
task 'test', 'run the CoffeeScript language test suite', ->