diff options
author | Reuben Thomas <rrt@sc3d.org> | 2011-06-09 14:01:37 +0100 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2011-06-09 19:53:41 +0100 |
commit | 530c9140c7628f7062e2caff73c94e547ea0c45f (patch) | |
tree | ef6cb15541530ea6cea22999769132f43c80c70e /tests | |
parent | d292b3243f90ba21450c0599b42aa89e999524ee (diff) | |
download | luafilesystem-530c9140c7628f7062e2caff73c94e547ea0c45f.tar.gz luafilesystem-530c9140c7628f7062e2caff73c94e547ea0c45f.tar.bz2 luafilesystem-530c9140c7628f7062e2caff73c94e547ea0c45f.zip |
Add trivial link_info support on Windows (using STAT_FUNC).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test.lua b/tests/test.lua index 7111074..6af7e9b 100644 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -69,13 +69,11 @@ 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 | local res, err = lfs.symlinkattributes(tmpfile) | 72 | -- Checking symbolic link information (does not work in Windows) |
73 | if err ~= "symlinkattributes not supported on this platform" then | 73 | if (os.execute ("ln -s "..tmpfile.." _a_link_for_test_")) then |
74 | -- Checking symbolic link information (does not work in Windows) | 74 | assert (lfs.attributes"_a_link_for_test_".mode == "file") |
75 | assert (os.execute ("ln -s "..tmpfile.." _a_link_for_test_")) | 75 | assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") |
76 | assert (lfs.attributes"_a_link_for_test_".mode == "file") | 76 | assert (os.remove"_a_link_for_test_") |
77 | assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") | ||
78 | assert (os.remove"_a_link_for_test_") | ||
79 | end | 77 | end |
80 | 78 | ||
81 | if lfs.setmode then | 79 | if lfs.setmode then |