diff options
author | Simon Hafner <hafnersimon@gmail.com> | 2013-03-10 19:49:02 -0500 |
---|---|---|
committer | Simon Hafner <hafnersimon@gmail.com> | 2013-03-10 19:49:02 -0500 |
commit | d34f95d1940d31d42bf0ce3c16c5366e41e668aa (patch) | |
tree | d8a1dafc6e4fdfe7fbe7a777583ff2a5335a7d10 /tests/run | |
parent | 5ac5bedc66c94a781c4a23fa6d0407c012276aa7 (diff) | |
download | Nim-d34f95d1940d31d42bf0ce3c16c5366e41e668aa.tar.gz |
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.
Diffstat (limited to 'tests/run')
-rwxr-xr-x | tests/run/tfinally.nim | 8 | ||||
-rwxr-xr-x | tests/run/tfinally2.nim | 17 |
2 files changed, 15 insertions, 10 deletions
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 diff --git a/tests/run/tfinally2.nim b/tests/run/tfinally2.nim index 3ed212a7c..af94aee5b 100755 --- a/tests/run/tfinally2.nim +++ b/tests/run/tfinally2.nim @@ -1,6 +1,9 @@ discard """ file: "tfinally2.nim" - output: "ABCD" + output: "A +B +C +D" """ # Test break in try statement: @@ -11,15 +14,15 @@ proc main: int = try: break AB finally: - stdout.write("A") - stdout.write("skipped") + echo("A") + echo("skipped") finally: block B: - stdout.write("B") - stdout.write("skipped") - stdout.write("C") + echo("B") + echo("skipped") + echo("C") finally: - stdout.writeln("D") + echo("D") discard main() #OUT ABCD |