mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
* 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
21 lines
283 B
Nim
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
|