test: avoid extra clear() calls

also: various other cleanup
This commit is contained in:
Justin M. Keyes
2017-10-02 00:24:19 +02:00
parent e9dba214ea
commit 6f7754dfa0
3 changed files with 29 additions and 40 deletions

View File

@@ -482,14 +482,14 @@ describe('path.c', function()
eq(OK, result)
end)
itp('works with a relative path with the current directory prefix #7117', function()
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('works with a relative path with the directory name mentioned twice #7117', function()
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)