mirror of
https://github.com/neovim/neovim.git
synced 2026-01-15 17:46:41 +10:00
test: fnamemodify with :8 filename modifier
This commit is contained in:
@@ -4,10 +4,19 @@ local eq = helpers.eq
|
||||
local iswin = helpers.iswin
|
||||
local fnamemodify = helpers.funcs.fnamemodify
|
||||
local command = helpers.command
|
||||
local write_file = helpers.write_file
|
||||
|
||||
describe('fnamemodify()', function()
|
||||
setup(function()
|
||||
write_file('Xtest-fnamemodify.txt', [[foobar]])
|
||||
end)
|
||||
|
||||
before_each(clear)
|
||||
|
||||
teardown(function()
|
||||
os.remove('Xtest-fnamemodify.txt')
|
||||
end)
|
||||
|
||||
it('works', function()
|
||||
if iswin() then
|
||||
local drive_f = io.popen('for %P in (%CD%) do @echo %~dP', 'r')
|
||||
@@ -29,4 +38,8 @@ describe('fnamemodify()', function()
|
||||
eq('/', fnamemodify([[/]], ':p'))
|
||||
end
|
||||
end)
|
||||
|
||||
it(':8 works', function()
|
||||
eq('Xtest-fnamemodify.txt', fnamemodify([[Xtest-fnamemodify.txt]], ':8'))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user