Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keplerproject/luafilesystem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.lua')
-rw-r--r--tests/test.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test.lua b/tests/test.lua
index 10810fe..591ee25 100644
--- a/tests/test.lua
+++ b/tests/test.lua
@@ -152,7 +152,10 @@ io.write(".")
io.flush()
-- Trying to get attributes of a non-existent file
-assert (lfs.attributes ("this couldn't be an actual file") == nil, "could get attributes of a non-existent file")
+local attr_ok, err, errno = lfs.attributes("this couldn't be an actual file")
+assert(attr_ok == nil, "could get attributes of a non-existent file")
+assert(type(err) == "string", "failed lfs.attributes did not return an error message")
+assert(type(errno) == "number", "failed lfs.attributes did not return error code")
assert (type(lfs.attributes (upper)) == "table", "couldn't get attributes of upper directory")
io.write(".")