From d34f95d1940d31d42bf0ce3c16c5366e41e668aa Mon Sep 17 00:00:00 2001 From: Simon Hafner Date: Sun, 10 Mar 2013 19:49:02 -0500 Subject: nestedTryStmts removed It makes tests fail and they work fine without. Given my ignorance of the exact workings, I can only rely on the tests. --- tests/run/tfinally.nim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/run/tfinally.nim') diff --git a/tests/run/tfinally.nim b/tests/run/tfinally.nim index 29313c3fd..2522dd0e4 100755 --- a/tests/run/tfinally.nim +++ b/tests/run/tfinally.nim @@ -1,6 +1,8 @@ discard """ file: "tfinally.nim" - output: "came here 3" + output: "came +here +3" """ # Test return in try statement: @@ -9,10 +11,10 @@ proc main: int = try: return 1 finally: - stdout.write("came ") + echo("came") return 2 finally: - stdout.write("here ") + echo("here ") return 3 echo main() #OUT came here 3 -- cgit 1.4.1-2-gfad0 From 129fcb327fb1900af0d9e55a668d7808344d29f3 Mon Sep 17 00:00:00 2001 From: Simon Hafner Date: Sat, 16 Mar 2013 07:21:31 -0500 Subject: used correct syntax for multiline results in tests And also modified the runner to actually run them in JS. --- tests/run/tfinally.nim | 4 ++-- tests/run/tfinally2.nim | 4 ++-- tests/specials.nim | 8 ++------ 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'tests/run/tfinally.nim') diff --git a/tests/run/tfinally.nim b/tests/run/tfinally.nim index 2522dd0e4..273aac72b 100755 --- a/tests/run/tfinally.nim +++ b/tests/run/tfinally.nim @@ -1,8 +1,8 @@ discard """ file: "tfinally.nim" - output: "came + output: '''came here -3" +3''' """ # Test return in try statement: diff --git a/tests/run/tfinally2.nim b/tests/run/tfinally2.nim index af94aee5b..e1e8d4c7e 100755 --- a/tests/run/tfinally2.nim +++ b/tests/run/tfinally2.nim @@ -1,9 +1,9 @@ discard """ file: "tfinally2.nim" - output: "A + output: '''A B C -D" +D''' """ # Test break in try statement: diff --git a/tests/specials.nim b/tests/specials.nim index 1818497a4..b5c49ec3c 100644 --- a/tests/specials.nim +++ b/tests/specials.nim @@ -176,14 +176,10 @@ proc runJsTests(r: var TResults, options: string) = runSingleTest(r, filename, options & " -d:nodejs", targetJS) runSingleTest(r, filename, options & " -d:nodejs -d:release", targetJS) - # texceptions, texcpt1, texcsub, tfinally, tfinally2, - # tfinally3 for t in os.walkFiles("tests/js/t*.nim"): test(t) - test "tests/run/tactiontable" - test "tests/run/tmultim1" - test "tests/run/tmultim3" - test "tests/run/tmultim4" + for testfile in ["texceptions", "texcpt1", "texcsub", "tfinally", "tfinally2", "tfinally3", "tactiontable", "tmultim1", "tmultim3", "tmultim4"]: + test "tests/run/" & testfile & ".nim" # ------------------------- register special tests here ----------------------- proc runSpecialTests(r: var TResults, options: string) = -- cgit 1.4.1-2-gfad0