tmemlinesBuf.nim 250 B

12345678910111213141516
  1. discard """
  2. output: "15"
  3. disabled: "appveyor"
  4. """
  5. import memfiles
  6. var inp = memfiles.open("tests/stdlib/tmemlinesBuf.nim")
  7. var buffer: TaintedString = ""
  8. var lineCount = 0
  9. for line in lines(inp, buffer):
  10. lineCount += 1
  11. close(inp)
  12. echo lineCount