diff options
author | Peter Melnichenko <mpeterval@gmail.com> | 2016-05-04 14:47:45 +0300 |
---|---|---|
committer | Peter Melnichenko <mpeterval@gmail.com> | 2016-05-05 15:10:56 +0300 |
commit | 6d6fd631bacbdb48e94ac89f2e5ed20b1cbbcb64 (patch) | |
tree | 2d2a8c2e56826faa2a197c71202832d3ecb674ce | |
parent | 46bbddc5a2384f25afa39a3cc5dea8b07f6310fa (diff) | |
download | luafilesystem-6d6fd631bacbdb48e94ac89f2e5ed20b1cbbcb64.tar.gz luafilesystem-6d6fd631bacbdb48e94ac89f2e5ed20b1cbbcb64.tar.bz2 luafilesystem-6d6fd631bacbdb48e94ac89f2e5ed20b1cbbcb64.zip |
Add a test for success return value of lfs.link
-rw-r--r-- | tests/test.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test.lua b/tests/test.lua index 5872717..7876165 100644 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -88,7 +88,9 @@ io.write(".") | |||
88 | io.flush() | 88 | io.flush() |
89 | 89 | ||
90 | -- Checking link (does not work on Windows) | 90 | -- Checking link (does not work on Windows) |
91 | if lfs.link (tmpfile, "_a_link_for_test_", true) then | 91 | local link_ok = lfs.link (tmpfile, "_a_link_for_test_", true) |
92 | if link_ok then | ||
93 | assert (link_ok == true, "successful lfs.link did not return true") | ||
92 | assert (lfs.attributes"_a_link_for_test_".mode == "file") | 94 | assert (lfs.attributes"_a_link_for_test_".mode == "file") |
93 | assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") | 95 | assert (lfs.symlinkattributes"_a_link_for_test_".mode == "link") |
94 | assert (lfs.link (tmpfile, "_a_hard_link_for_test_")) | 96 | assert (lfs.link (tmpfile, "_a_hard_link_for_test_")) |