mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
16 lines
250 B
Nim
16 lines
250 B
Nim
discard """
|
|
output: "15"
|
|
disabled: "appveyor"
|
|
"""
|
|
|
|
import memfiles
|
|
var inp = memfiles.open("tests/stdlib/tmemlinesBuf.nim")
|
|
var buffer: TaintedString = ""
|
|
var lineCount = 0
|
|
for line in lines(inp, buffer):
|
|
lineCount += 1
|
|
|
|
close(inp)
|
|
|
|
echo lineCount
|