diff options
Diffstat (limited to 'tests/stdlib/tmemlinesBuf.nim')
-rw-r--r-- | tests/stdlib/tmemlinesBuf.nim | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/stdlib/tmemlinesBuf.nim b/tests/stdlib/tmemlinesBuf.nim index 21edc2322..7bd89d4f2 100644 --- a/tests/stdlib/tmemlinesBuf.nim +++ b/tests/stdlib/tmemlinesBuf.nim @@ -1,6 +1,9 @@ -import memfiles -var inp = memfiles.open("readme.txt") -var buffer: TaintedString = "" +import std/[memfiles, assertions] +var inp = memfiles.open("tests/stdlib/tmemlinesBuf.nim") +var buffer: string = "" +var lineCount = 0 for line in lines(inp, buffer): - echo("#" & line & "#") + lineCount += 1 + close(inp) +doAssert lineCount == 9, $lineCount # this file's number of lines |