Files
Nim/tests/stdlib/tstreams3.nim
Clyybber 16c39f9b2e More of StringStream now works at compile time (#12284)
* readLine of StringStream now works at compile time
* Work for js backend only at compile time
* readAll now works at CT
* readAll works in js ct now
* Add test
2019-09-29 22:20:00 +02:00

21 lines
283 B
Nim

discard """
output: "threw exception"
nimout: '''
I
AM
GROOT
'''
"""
import streams
try:
var fs = openFileStream("shouldneverexist.txt")
except IoError:
echo "threw exception"
static:
var s = newStringStream("I\nAM\nGROOT")
for line in s.lines:
echo line
s.close