diff options
-rw-r--r-- | tests/test.lua | 3 |
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" | |||
107 | result, mode = lfs.setmode(f, "text") | 107 | result, mode = lfs.setmode(f, "text") |
108 | assert(result and mode == "binary") | 108 | assert(result and mode == "binary") |
109 | f:close() | 109 | f:close() |
110 | local ok, err = pcall(lfs.setmode, f, "binary") | ||
111 | assert(not ok, "could setmode on closed file") | ||
112 | assert(err:find("closed file"), "bad error message for setmode on closed file") | ||
110 | 113 | ||
111 | io.write(".") | 114 | io.write(".") |
112 | io.flush() | 115 | io.flush() |