aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test.lua b/tests/test.lua
index eecabdc..728bdda 100644
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -69,12 +69,13 @@ local new_att = assert (lfs.attributes (tmpfile))
69assert (new_att.access == testdate2, "could not set access time") 69assert (new_att.access == testdate2, "could not set access time")
70assert (new_att.modification == testdate1, "could not set modification time") 70assert (new_att.modification == testdate1, "could not set modification time")
71 71
72-- Checking symbolic link information 72if lfs.symlinkattributes then
73-- We have to review these tests since they don't work in Windows and assume os.execute is available 73 -- Checking symbolic link information (does not work in Windows)
74--assert (os.execute ("ln -s "..tmpfile.." _a_link_for_test_")) 74 assert (os.execute ("ln -s "..tmpfile.." _a_link_for_test_"))
75--assert (lfs.attributes"_a_link_for_test_".mode == "file") 75 assert (lfs.attributes"_a_link_for_test_".mode == "file")
76--assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") 76 assert (lfs.symlinkattributes"_a_link_for_test_" == "link")
77--assert (os.remove"_a_link_for_test_") 77 assert (os.remove"_a_link_for_test_")
78end
78 79
79-- Restore access time to current value 80-- Restore access time to current value
80assert (lfs.touch (tmpfile, attrib.access, attrib.modification)) 81assert (lfs.touch (tmpfile, attrib.access, attrib.modification))