aboutsummaryrefslogtreecommitdiff
path: root/test/unit/path_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/path_spec.lua')
-rw-r--r--test/unit/path_spec.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/unit/path_spec.lua b/test/unit/path_spec.lua
index 41954de9be..15ce59747e 100644
--- a/test/unit/path_spec.lua
+++ b/test/unit/path_spec.lua
@@ -54,15 +54,21 @@ describe('path.c', function()
eq(lfs.currentdir(), (ffi.string(buffer)))
end)
- itp('fails if the given directory does not exist', function()
- eq(FAIL, path_full_dir_name('does_not_exist', buffer, length))
- end)
-
itp('works with a normal relative dir', function()
local result = path_full_dir_name('unit-test-directory', buffer, length)
eq(lfs.currentdir() .. '/unit-test-directory', (ffi.string(buffer)))
eq(OK, result)
end)
+
+ itp('works with a non-existing relative dir', function()
+ local result = path_full_dir_name('does-not-exist', buffer, length)
+ eq(lfs.currentdir() .. '/does-not-exist', (ffi.string(buffer)))
+ eq(OK, result)
+ end)
+
+ itp('fails with a non-existing absolute dir', function()
+ eq(FAIL, path_full_dir_name('/does_not_exist', buffer, length))
+ end)
end)
describe('path_full_compare', function()