Merge remote-tracking branch 'nim-lang/devel' into emscripten-support
This commit is contained in:
commit
76a49bfcea
7 changed files with 87 additions and 8 deletions
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
test that closing a closed file is ignored (no error raised)
|
||||
file: "tmemfiles1.nim"
|
||||
"""
|
||||
import memfiles, os
|
||||
|
|
|
|||
|
|
@ -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'''
|
||||
|
|
|
|||
13
tests/stdlib/tstreams2.nim
Normal file
13
tests/stdlib/tstreams2.nim
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue