mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
16 lines
243 B
Nim
16 lines
243 B
Nim
discard """
|
|
output: "15"
|
|
disabled: "appveyor"
|
|
"""
|
|
|
|
import memfiles
|
|
var inp = memfiles.open("tests/stdlib/tmemlinesBuf.nim")
|
|
var buffer: string = ""
|
|
var lineCount = 0
|
|
for line in lines(inp, buffer):
|
|
lineCount += 1
|
|
|
|
close(inp)
|
|
|
|
echo lineCount
|