diff options
author | ckelsel <ckelsel@hotmail.com> | 2017-10-07 18:14:09 +0800 |
---|---|---|
committer | ckelsel <ckelsel@hotmail.com> | 2017-10-07 18:14:09 +0800 |
commit | f2b9ccec106b6c4619cc762ea77546810f1cbfd4 (patch) | |
tree | 93fb82598ecf1d227137cd093c16cc14b537e76c /test/unit/path_spec.lua | |
parent | fae55937ac31c0d61c2c89ed0e9be43f3bd2a759 (diff) | |
parent | 01487d4385aeffae4b2365689c7d798f740f7100 (diff) | |
download | rneovim-f2b9ccec106b6c4619cc762ea77546810f1cbfd4.tar.gz rneovim-f2b9ccec106b6c4619cc762ea77546810f1cbfd4.tar.bz2 rneovim-f2b9ccec106b6c4619cc762ea77546810f1cbfd4.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/unit/path_spec.lua')
-rw-r--r-- | test/unit/path_spec.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/path_spec.lua b/test/unit/path_spec.lua index a9cba7df84..befb204d0a 100644 --- a/test/unit/path_spec.lua +++ b/test/unit/path_spec.lua @@ -481,6 +481,20 @@ describe('path.c', function() eq('/tmp', ffi.string(buffer)) eq(OK, result) end) + + itp('expands "./" to the current directory #7117', function() + local force_expansion = 1 + local result = vim_FullName('./unit-test-directory/test.file', buffer, length, force_expansion) + eq(OK, result) + eq(lfs.currentdir() .. '/unit-test-directory/test.file', (ffi.string(buffer))) + end) + + itp('collapses "foo/../foo" to "foo" #7117', function() + local force_expansion = 1 + local result = vim_FullName('unit-test-directory/../unit-test-directory/test.file', buffer, length, force_expansion) + eq(OK, result) + eq(lfs.currentdir() .. '/unit-test-directory/test.file', (ffi.string(buffer))) + end) end) describe('path_fix_case', function() |