diff options
author | steve donovan <steve.j.donovan@gmail.com> | 2011-04-05 19:04:26 +0400 |
---|---|---|
committer | steve donovan <steve.j.donovan@gmail.com> | 2011-04-05 19:04:26 +0400 |
commit | a51224cca6ad2118b00cb379890ea8e5c7ef1ac5 (patch) | |
tree | ae5d89ea9766748d1179083d961d661aaaff3b35 /tests/test-dir.lua | |
parent | ba056786e2a2a07c4a57bccb0a8bd1ad63787c9f (diff) |
more test code
Diffstat (limited to 'tests/test-dir.lua')
-rw-r--r-- | tests/test-dir.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test-dir.lua b/tests/test-dir.lua index 494db47..9ab73d3 100644 --- a/tests/test-dir.lua +++ b/tests/test-dir.lua @@ -6,19 +6,21 @@ local path = require( "pl.path" ) local asserteq = require( "pl.test" ).asserteq local pretty = require( "pl.pretty" ) -local expected = {"../docs/function_index.txt"} +local normcase = path.normcase -local files = dir.getallfiles( "../docs/", "*.txt" ) +local expected = {normcase "../docs/function_index.txt"} + +local files = dir.getallfiles( normcase "../docs/", "*.txt" ) asserteq( files, expected ) -- Test move files ----------------------------------------- --- + -- Create a dummy file -local fileName = "poot.txt" +local fileName = path.tmpname() file.write( fileName, string.rep( "poot ", 1000 ) ) -local newFileName = "move_test.txt" +local newFileName = path.tmpname() local err, msg = dir.movefile( fileName, newFileName ) -- Make sure the move is successful |