summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2019-09-29 22:20:00 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-09-29 22:20:00 +0200
commit16c39f9b2edc963655889cfd33e165bfae91c96d (patch)
tree9da74d03a757de874d9f01a8a055875643bbfbb2 /tests
parent85db42ad8c1a19ea47bd5826d8639e8974cc9042 (diff)
downloadNim-16c39f9b2edc963655889cfd33e165bfae91c96d.tar.gz
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
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tstreams3.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/stdlib/tstreams3.nim b/tests/stdlib/tstreams3.nim
index e3b395e05..89f45f275 100644
--- a/tests/stdlib/tstreams3.nim
+++ b/tests/stdlib/tstreams3.nim
@@ -1,5 +1,10 @@
 discard """
   output: "threw exception"
+  nimout: '''
+I
+AM
+GROOT
+'''
 """
 import streams
 
@@ -7,3 +12,9 @@ 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