aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Melnichenko <mpeterval@gmail.com>2016-05-04 14:47:45 +0300
committerPeter Melnichenko <mpeterval@gmail.com>2016-05-05 15:10:56 +0300
commit6d6fd631bacbdb48e94ac89f2e5ed20b1cbbcb64 (patch)
tree2d2a8c2e56826faa2a197c71202832d3ecb674ce
parent46bbddc5a2384f25afa39a3cc5dea8b07f6310fa (diff)
downloadluafilesystem-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.lua4
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(".")
88io.flush() 88io.flush()
89 89
90-- Checking link (does not work on Windows) 90-- Checking link (does not work on Windows)
91if lfs.link (tmpfile, "_a_link_for_test_", true) then 91local link_ok = lfs.link (tmpfile, "_a_link_for_test_", true)
92if 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_"))