diff options
author | Arne Döring <arne.doering@gmx.net> | 2018-11-28 09:43:22 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-12-11 21:23:19 +0100 |
commit | 465e7421827e752d94d1f283b6ce23f6b4125306 (patch) | |
tree | 532ce11bbe566e857a2b3aa21a7c651ce27fe38c | |
parent | e9ea8fb6b032702de982c59b8391c4419efc3c46 (diff) | |
download | Nim-465e7421827e752d94d1f283b6ce23f6b4125306.tar.gz |
fix js category
-rw-r--r-- | testament/tester.nim | 6 | ||||
-rw-r--r-- | tests/js/t7224.nim | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/testament/tester.nim b/testament/tester.nim index 111b701be..27a3ec089 100644 --- a/testament/tester.nim +++ b/testament/tester.nim @@ -384,7 +384,7 @@ proc testSpec(r: var TResults, test: TTest, targets: set[TTarget] = {}) = let isJsTarget = target == targetJS var exeFile: string if isJsTarget: - let file = changeFileExt(test.name, "js") + let file = test.name.lastPathPart.changeFileExt("js") exeFile = nimcacheDir(test.name, test.options, target) / file else: exeFile = changeFileExt(test.name, ExeExt) @@ -428,8 +428,8 @@ proc testSpec(r: var TResults, test: TTest, targets: set[TTarget] = {}) = bufB, reExitCodesDiffer) continue - if (expected.outputCheck == ocEqual and bufB != expected.outp) or - (expected.outputCheck == ocSubstr and bufB notin expected.outp): + if (expected.outputCheck == ocEqual and expected.outp != bufB) or + (expected.outputCheck == ocSubstr and expected.outp notin bufB): given.err = reOutputsDiffer r.addResult(test, target, expected.outp, bufB, reOutputsDiffer) continue diff --git a/tests/js/t7224.nim b/tests/js/t7224.nim index 2d7ee1336..be9d0ae9c 100644 --- a/tests/js/t7224.nim +++ b/tests/js/t7224.nim @@ -7,7 +7,7 @@ t7224.ccc, line: 15 t7224.ddd, line: 12 ''' """ - + proc ddd() = raise newException(IOError, "didn't do stuff") @@ -22,5 +22,6 @@ proc aaa() = try: aaa() + except IOError as e: echo getStackTrace(e) |