Add a test for success return value of lfs.link

This commit is contained in:
Peter Melnichenko
2016-05-04 14:47:45 +03:00
parent 46bbddc5a2
commit 6d6fd631ba

View File

@@ -88,7 +88,9 @@ io.write(".")
io.flush()
-- Checking link (does not work on Windows)
if lfs.link (tmpfile, "_a_link_for_test_", true) then
local link_ok = lfs.link (tmpfile, "_a_link_for_test_", true)
if link_ok then
assert (link_ok == true, "successful lfs.link did not return true")
assert (lfs.attributes"_a_link_for_test_".mode == "file")
assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link")
assert (lfs.link (tmpfile, "_a_hard_link_for_test_"))