diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-08-29 11:52:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-29 11:52:41 +0200 |
commit | 10ee254a502042965beaa4af3000008f4f45299b (patch) | |
tree | 993972f2b84efd44d741dcd2bf4d6c858485cc37 /tests/testament | |
parent | 7d76f494064621a075701d3a68c7cd0b0a483eaf (diff) | |
parent | fc4bced41b174668c5239afda1d5aade45f055bf (diff) | |
download | Nim-10ee254a502042965beaa4af3000008f4f45299b.tar.gz |
Merge pull request #4661 from yglukhov/js-uncaught-stacktrace
Uncaught exceptions in JS now always propagate with better stack trace. Fixed codegen bug.
Diffstat (limited to 'tests/testament')
-rw-r--r-- | tests/testament/categories.nim | 1 | ||||
-rw-r--r-- | tests/testament/tester.nim | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index 820078c54..29b6d9aba 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -221,6 +221,7 @@ proc jsTests(r: var TResults, cat: Category, options: string) = for testfile in ["exception/texceptions", "exception/texcpt1", "exception/texcsub", "exception/tfinally", "exception/tfinally2", "exception/tfinally3", + "exception/tunhandledexc", "actiontable/tactiontable", "method/tmultim1", "method/tmultim3", "method/tmultim4", "varres/tvarres0", "varres/tvarres3", "varres/tvarres4", diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim index 83e59a6c1..74ac58927 100644 --- a/tests/testament/tester.nim +++ b/tests/testament/tester.nim @@ -334,6 +334,11 @@ proc testSpec(r: var TResults, test: TTest) = let exeCmd = (if isJsTarget: nodejs & " " else: "") & exeFile var (buf, exitCode) = execCmdEx(exeCmd, options = {poStdErrToStdOut}) + + # Treat all failure codes from nodejs as 1. Older versions of nodejs used + # to return other codes, but for us it is sufficient to know that it's not 0. + if exitCode != 0: exitCode = 1 + let bufB = if expected.sortoutput: makeDeterministic(strip(buf.string)) else: strip(buf.string) let expectedOut = strip(expected.outp) |