add memfiles test that closing a closed memFile is ignored (and raises no [OSError])

This commit is contained in:
JamesP
2015-09-24 09:23:48 +10:00
parent 305766a9fa
commit 7490667578

View File

@@ -0,0 +1,13 @@
discard """
test that closing a closed file is ignored (no error raised)
output: nothing
"""
import memfiles, os
var
mm: MemFile
fn = "test.mmap"
# Create a new file
mm = memfiles.open(fn, mode = fmReadWrite, newFileSize = 20)
mm.close()
mm.close()
if fileExists(fn): removeFile(fn)