Merge remote-tracking branch 'nim-lang/devel' into emscripten-support

This commit is contained in:
Andrey Sobolev 2015-09-28 22:21:13 +06:00
commit 76a49bfcea
7 changed files with 87 additions and 8 deletions

View file

@ -1,5 +1,4 @@
discard """
test that closing a closed file is ignored (no error raised)
file: "tmemfiles1.nim"
"""
import memfiles, os

View file

@ -1,5 +1,4 @@
discard """
test creating/reading/writing/changing memfiles
file: "tmemfiles2.nim"
output: '''Full read size: 20
Half read size: 10 Data: Hello'''

View file

@ -0,0 +1,13 @@
discard """
file: "tstreams2.nim"
output: '''fs is: nil'''
"""
import streams
var
fs = newFileStream("amissingfile.txt")
line = ""
echo "fs is: ",repr(fs)
if not isNil(fs):
while fs.readLine(line):
echo line
fs.close()