diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test.lua b/tests/test.lua index 2331eec..10810fe 100644 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -132,6 +132,17 @@ for key, value in pairs(attr) do | |||
132 | "lfs.attributes values not consistent") | 132 | "lfs.attributes values not consistent") |
133 | end | 133 | end |
134 | 134 | ||
135 | -- Check that lfs.attributes accepts a table as second argument | ||
136 | local attr2 = {} | ||
137 | lfs.attributes(tmpfile, attr2) | ||
138 | for key, value in pairs(attr2) do | ||
139 | assert (value == lfs.attributes (tmpfile, key), | ||
140 | "lfs.attributes values with table argument not consistent") | ||
141 | end | ||
142 | |||
143 | -- Check that extra arguments are ignored | ||
144 | lfs.attributes(tmpfile, attr2, nil) | ||
145 | |||
135 | -- Remove new file and directory | 146 | -- Remove new file and directory |
136 | assert (os.remove (tmpfile), "could not remove new file") | 147 | assert (os.remove (tmpfile), "could not remove new file") |
137 | assert (lfs.rmdir (tmpdir), "could not remove new directory") | 148 | assert (lfs.rmdir (tmpdir), "could not remove new directory") |