diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-11-21 17:47:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-21 17:47:09 -0500 |
commit | 0d967f0298a355452f62b9c76c34e102a6b9016e (patch) | |
tree | 467949d95f8bb1791a31c7439846bf6d2755d3e1 /test/unit/path_spec.lua | |
parent | d99d4af7b129032865cb5a4fd8e6999e73460fb0 (diff) | |
parent | 349b9ce9df0c7f48ce236216ab0d2c507f483425 (diff) | |
download | rneovim-0d967f0298a355452f62b9c76c34e102a6b9016e.tar.gz rneovim-0d967f0298a355452f62b9c76c34e102a6b9016e.tar.bz2 rneovim-0d967f0298a355452f62b9c76c34e102a6b9016e.zip |
Merge pull request #16362 from zeertzjq/vim-8.2.3617
vim-patch:8.2.{3468,3617,3618,3622}: some other CWD related patches
Diffstat (limited to 'test/unit/path_spec.lua')
-rw-r--r-- | test/unit/path_spec.lua | 14 |
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() |