diff options
author | carregal <carregal> | 2007-10-26 21:06:14 +0000 |
---|---|---|
committer | carregal <carregal> | 2007-10-26 21:06:14 +0000 |
commit | 4790b562ca48f7305126057bde4785b8747edf55 (patch) | |
tree | 7881557b37d3f7f8a27209eeaacf3c72a9b5d4e9 /tests | |
parent | 8432017680987f4307e893065c97ba1329c79b83 (diff) | |
download | luafilesystem-4790b562ca48f7305126057bde4785b8747edf55.tar.gz luafilesystem-4790b562ca48f7305126057bde4785b8747edf55.tar.bz2 luafilesystem-4790b562ca48f7305126057bde4785b8747edf55.zip |
Checking for lfs.symlinkattributes so the tests are not applied in Windows
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.lua | 13 |
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)) | |||
69 | assert (new_att.access == testdate2, "could not set access time") | 69 | assert (new_att.access == testdate2, "could not set access time") |
70 | assert (new_att.modification == testdate1, "could not set modification time") | 70 | assert (new_att.modification == testdate1, "could not set modification time") |
71 | 71 | ||
72 | -- Checking symbolic link information | 72 | if 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_") |
78 | end | ||
78 | 79 | ||
79 | -- Restore access time to current value | 80 | -- Restore access time to current value |
80 | assert (lfs.touch (tmpfile, attrib.access, attrib.modification)) | 81 | assert (lfs.touch (tmpfile, attrib.access, attrib.modification)) |