From 6d6fd631bacbdb48e94ac89f2e5ed20b1cbbcb64 Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Wed, 4 May 2016 14:47:45 +0300 Subject: [PATCH] Add a test for success return value of lfs.link --- tests/test.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(".") 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_"))