aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test.lua b/tests/test.lua
index d47a062..4c09020 100644
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -77,6 +77,16 @@ if lfs.symlinkattributes then
77 assert (os.remove"_a_link_for_test_") 77 assert (os.remove"_a_link_for_test_")
78end 78end
79 79
80if lfs.setmode then
81 -- Checking text/binary modes (works only in Windows)
82 local f = io.open(tmpfile, "w")
83 local mode = lfs.setmode(f, "binary")
84 assert(mode == "text")
85 mode = lfs.setmode(f, "text")
86 assert(mode == "binary")
87 f:close()
88end
89
80-- Restore access time to current value 90-- Restore access time to current value
81assert (lfs.touch (tmpfile, attrib.access, attrib.modification)) 91assert (lfs.touch (tmpfile, attrib.access, attrib.modification))
82new_att = assert (lfs.attributes (tmpfile)) 92new_att = assert (lfs.attributes (tmpfile))