diff options
Diffstat (limited to 'tests/test.lua')
-rw-r--r-- | tests/test.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test.lua b/tests/test.lua index 81a0ab6..c4911c9 100644 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -69,11 +69,14 @@ 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 (does not work in Windows) | 72 | -- Checking link (does not work on Windows) |
73 | if (os.execute ("ln -s "..tmpfile.." _a_link_for_test_")) then | 73 | if lfs.link (tmpfile, "_a_link_for_test_", true) then |
74 | assert (lfs.attributes"_a_link_for_test_".mode == "file") | 74 | assert (lfs.attributes"_a_link_for_test_".mode == "file") |
75 | assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") | 75 | assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") |
76 | assert (lfs.link (tmpfile, "_a_hard_link_for_test_")) | ||
77 | assert (lfs.attributes (tmpfile, "nlink") == 2) | ||
76 | assert (os.remove"_a_link_for_test_") | 78 | assert (os.remove"_a_link_for_test_") |
79 | assert (os.remove"_a_hard_link_for_test_") | ||
77 | end | 80 | end |
78 | 81 | ||
79 | -- Checking text/binary modes (only has an effect in Windows) | 82 | -- Checking text/binary modes (only has an effect in Windows) |