aboutsummaryrefslogtreecommitdiff
path: root/test/unit/path_spec.lua
diff options
context:
space:
mode:
authorIgnas Anikevicius <anikevicius@gmail.com>2017-09-18 21:06:55 +0300
committerJustin M. Keyes <justinkz@gmail.com>2017-10-02 00:48:30 +0200
commit2b133101cf67b523c2503ef715dfb9ebfa732da2 (patch)
tree3955290491608369498a6821d070d6d711248da2 /test/unit/path_spec.lua
parent981387b7c83026c1446cdddf6b374f63973a2b86 (diff)
downloadrneovim-2b133101cf67b523c2503ef715dfb9ebfa732da2.tar.gz
rneovim-2b133101cf67b523c2503ef715dfb9ebfa732da2.tar.bz2
rneovim-2b133101cf67b523c2503ef715dfb9ebfa732da2.zip
win: vim_FullName(): force backslashes #7287
- Replace obvious cases of '/' literal with PATHSEP. (There are still some remaining cases that need closer inspection.) - Fixup tests: ui/screen_basic closes #7117 ref https://github.com/neovim/neovim/issues/2471#issuecomment-271193714
Diffstat (limited to 'test/unit/path_spec.lua')
-rw-r--r--test/unit/path_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/path_spec.lua b/test/unit/path_spec.lua
index a9cba7df84..0400747e72 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('works with a relative path with the current directory prefix #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('works with a relative path with the directory name mentioned twice #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()