diff options
| author | mascarenhas <mascarenhas> | 2008-03-25 16:58:29 +0000 |
|---|---|---|
| committer | mascarenhas <mascarenhas> | 2008-03-25 16:58:29 +0000 |
| commit | ca8efaa8e7005e3c0e352d3228948365f59b12b6 (patch) | |
| tree | 70698e48da563d3c9ba8cf9de195d97d13221746 /tests | |
| parent | 3aba7a98fbbc7276ab3fece2fcc001df9541bcbb (diff) | |
| download | luafilesystem-ca8efaa8e7005e3c0e352d3228948365f59b12b6.tar.gz luafilesystem-ca8efaa8e7005e3c0e352d3228948365f59b12b6.tar.bz2 luafilesystem-ca8efaa8e7005e3c0e352d3228948365f59b12b6.zip | |
large file support in lfs.attributes (bug #2185)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test.lua b/tests/test.lua index 882838b..1fd6157 100644 --- a/tests/test.lua +++ b/tests/test.lua | |||
| @@ -69,7 +69,8 @@ local new_att = assert (lfs.attributes (tmpfile)) | |||
| 69 | assert (new_att.access == testdate2, "could not set access time") | 69 | assert (new_att.access == testdate2, "could not set access time") |
| 70 | assert (new_att.modification == testdate1, "could not set modification time") | 70 | assert (new_att.modification == testdate1, "could not set modification time") |
| 71 | 71 | ||
| 72 | if lfs.symlinkattributes then | 72 | local res, err = lfs.symlinkattributes(tmpfile) |
| 73 | if err ~= "symlinkattributes not supported on this platform" then | ||
| 73 | -- Checking symbolic link information (does not work in Windows) | 74 | -- Checking symbolic link information (does not work in Windows) |
| 74 | assert (os.execute ("ln -s "..tmpfile.." _a_link_for_test_")) | 75 | assert (os.execute ("ln -s "..tmpfile.." _a_link_for_test_")) |
| 75 | assert (lfs.attributes"_a_link_for_test_".mode == "file") | 76 | assert (lfs.attributes"_a_link_for_test_".mode == "file") |
| @@ -81,9 +82,9 @@ if lfs.setmode then | |||
| 81 | -- Checking text/binary modes (works only in Windows) | 82 | -- Checking text/binary modes (works only in Windows) |
| 82 | local f = io.open(tmpfile, "w") | 83 | local f = io.open(tmpfile, "w") |
| 83 | local result, mode = lfs.setmode(f, "binary") | 84 | local result, mode = lfs.setmode(f, "binary") |
| 84 | assert(result and mode == "text") | 85 | assert((result and mode == "text") or (not result and mode == "setmode not supported on this platform")) |
| 85 | result, mode = lfs.setmode(f, "text") | 86 | result, mode = lfs.setmode(f, "text") |
| 86 | assert(result and mode == "binary") | 87 | assert((result and mode == "binary") or (not result and mode == "setmode not supported on this platform")) |
| 87 | f:close() | 88 | f:close() |
| 88 | end | 89 | end |
| 89 | 90 | ||
