aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcarregal <carregal>2007-10-26 21:06:14 +0000
committercarregal <carregal>2007-10-26 21:06:14 +0000
commit4790b562ca48f7305126057bde4785b8747edf55 (patch)
tree7881557b37d3f7f8a27209eeaacf3c72a9b5d4e9
parent8432017680987f4307e893065c97ba1329c79b83 (diff)
downloadluafilesystem-4790b562ca48f7305126057bde4785b8747edf55.tar.gz
luafilesystem-4790b562ca48f7305126057bde4785b8747edf55.tar.bz2
luafilesystem-4790b562ca48f7305126057bde4785b8747edf55.zip
Checking for lfs.symlinkattributes so the tests are not applied in Windows
-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))