diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test.lua b/tests/test.lua index 5703bfb..25a3fd3 100644 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -30,11 +30,11 @@ local reldir = string.gsub (current, "^.*%"..sep.."([^"..sep.."])$", "%1") | |||
30 | assert (lfs.chdir (upper), "could not change to upper directory") | 30 | assert (lfs.chdir (upper), "could not change to upper directory") |
31 | assert (lfs.chdir (reldir), "could not change back to current directory") | 31 | assert (lfs.chdir (reldir), "could not change back to current directory") |
32 | assert (lfs.currentdir() == current, "error trying to change directories") | 32 | assert (lfs.currentdir() == current, "error trying to change directories") |
33 | assert (lfs.chdir ("this couldn't be an actual directory") == false, "could change to a non-existent directory") | 33 | assert (lfs.chdir ("this couldn't be an actual directory") == nil, "could change to a non-existent directory") |
34 | -- Changing creating and removing directories | 34 | -- Changing creating and removing directories |
35 | assert (lfs.mkdir (tmp.."/lfs_tmp_dir"), "could not make a new directory") | 35 | assert (lfs.mkdir (tmp.."/lfs_tmp_dir"), "could not make a new directory") |
36 | assert (os.remove (tmp.."/lfs_tmp_dir"), "could not remove new directory") | 36 | assert (os.remove (tmp.."/lfs_tmp_dir"), "could not remove new directory") |
37 | assert (lfs.mkdir (tmp.."/lfs_tmp_dir/lfs_tmp_dir") == false, "could create a directory inside a non-existent one") | 37 | assert (lfs.mkdir (tmp.."/lfs_tmp_dir/lfs_tmp_dir") == false, "could create a directory inside a non-existent one") |
38 | -- | 38 | -- |
39 | assert (lfs.attributes ("this couldn't be an actual file") == false, "could get attributes of a non-existent file") | 39 | assert (lfs.attributes ("this couldn't be an actual file") == nil, "could get attributes of a non-existent file") |
40 | assert (type(lfs.attributes (upper)) == "table", "couldn't get attributes of upper directory") | 40 | assert (type(lfs.attributes (upper)) == "table", "couldn't get attributes of upper directory") |