diff options
author | Araq <rumpf_a@web.de> | 2012-01-02 14:30:46 -0800 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-01-02 14:30:46 -0800 |
commit | dcf0cc2ecdbb088d8b57df28bc2fc01c803d646b (patch) | |
tree | eb2cbfc1593469f0fdbfa9b8453abf8e4e9f88d5 | |
parent | d849463af22f02d4a5e4fa7edd5e756aa6cc39fe (diff) | |
parent | cb4ff5fd552e3edebf0e213ba063c4cf90f1ff00 (diff) | |
download | Nim-dcf0cc2ecdbb088d8b57df28bc2fc01c803d646b.tar.gz |
Merge pull request #86 from Tass/master
Fixed IO tests.
-rw-r--r-- | tests/specials.nim | 6 | ||||
-rw-r--r-- | tests/system/helpers/readall_echo.nim | 3 | ||||
-rw-r--r-- | tests/system/io.nim | 10 |
3 files changed, 6 insertions, 13 deletions
diff --git a/tests/specials.nim b/tests/specials.nim index b293dce83..2f78a3b81 100644 --- a/tests/specials.nim +++ b/tests/specials.nim @@ -140,10 +140,9 @@ proc rejectThreadTests(r: var TResults, options: string) = # ------------------------- IO tests ----------------------------------- -proc compileIOTests(r: var TResults, options: string) = - compileSingleTest(r, "tests/system/helpers/readall_echo.nim", options) - proc runIOTests(r: var TResults, options: string) = + # We need readall_echo to be compiled for this test to run. + compileSingleTest(r, "tests/system/helpers/readall_echo", options) runSingleTest(r, "tests/system/io", options) # ------------------------- register special tests here ----------------------- @@ -163,6 +162,5 @@ proc compileSpecialTests(r: var TResults, options: string) = compileSingleTest(r, "compiler/c2nim/c2nim.nim", options) compileSingleTest(r, "compiler/pas2nim/pas2nim.nim", options) - compileIOTests(r, options) compileDLLTests(r, options) diff --git a/tests/system/helpers/readall_echo.nim b/tests/system/helpers/readall_echo.nim index 2890217ef..79937bf6f 100644 --- a/tests/system/helpers/readall_echo.nim +++ b/tests/system/helpers/readall_echo.nim @@ -1 +1,2 @@ -echo(stdin.readAll) +when isMainModule: + echo(stdin.readAll) diff --git a/tests/system/io.nim b/tests/system/io.nim index cc5f07080..d9604eb46 100644 --- a/tests/system/io.nim +++ b/tests/system/io.nim @@ -1,12 +1,6 @@ -discard """output: '''[OK] stdin - -[OK] file''' -disabled: true -""" - import - unittest, osproc, streams, os, "helpers/readall_echo" -const STRING_DATA = """Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.""" + unittest, osproc, streams, os +const STRING_DATA = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." const TEST_FILE = "tests/testdata/string" proc echoLoop(str: string): string = |