Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keplerproject/luafilesystem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.lua')
-rw-r--r--tests/test.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test.lua b/tests/test.lua
index abfbd4d..2842bc0 100644
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -107,6 +107,9 @@ assert(result) -- on non-Windows platforms, mode is always returned as "binary"
result, mode = lfs.setmode(f, "text")
assert(result and mode == "binary")
f:close()
+local ok, err = pcall(lfs.setmode, f, "binary")
+assert(not ok, "could setmode on closed file")
+assert(err:find("closed file"), "bad error message for setmode on closed file")
io.write(".")
io.flush()