diff options
author | Miran <narimiran@users.noreply.github.com> | 2018-10-19 11:43:35 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-19 11:43:35 +0200 |
commit | 9fb212cfdf2555cbebc8b8c453aa45c151534dfb (patch) | |
tree | 14844bf30c588668e3faa0a95e55628af4334d53 /tests/stdlib/tio.nim | |
parent | 3b1ade03507029ae96dc15190d453e2d71c9cf2b (diff) | |
download | Nim-9fb212cfdf2555cbebc8b8c453aa45c151534dfb.tar.gz |
merge stdlib tests (#9439)
Diffstat (limited to 'tests/stdlib/tio.nim')
-rw-r--r-- | tests/stdlib/tio.nim | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/tests/stdlib/tio.nim b/tests/stdlib/tio.nim deleted file mode 100644 index b1057dee2..000000000 --- a/tests/stdlib/tio.nim +++ /dev/null @@ -1,49 +0,0 @@ -discard """ - output: '''9 -b = true -123456789 -Second readLine raised an exception -123456789 -1 -2aaaaaaaa -3bbbbbbb -''' -""" -# bug #5349 -import os - -# test the file-IO - -const fn = "file9char.txt" - -writeFile(fn, "123456789") - -var f = open(fn) -echo getFileSize(f) - -var line = newString(10) -try: - let b = readLine(f, line) - echo "b = ", b -except: - echo "First readLine raised an exception" - -echo line - -try: - line = readLine(f) - let b = readLine(f, line) - echo "b = ", b -except: - echo "Second readLine raised an exception" - -echo line -f.close() - -removeFile(fn) - -# bug #8961 -writeFile("test.txt", "1\C\L2aaaaaaaa\C\L3bbbbbbb") - -for line in lines("test.txt"): - echo line |