mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fixup: always delete Xfile, fix exit code check
after_each + os.remove ensures Xfile is deleted after every test. Windows exit code is inconsistent.
This commit is contained in:
parent
05282069db
commit
e21f454e11
@ -40,7 +40,7 @@ describe(':write', function()
|
|||||||
else
|
else
|
||||||
command("silent !ln -s test_bkc_file.txt test_bkc_link.txt")
|
command("silent !ln -s test_bkc_file.txt test_bkc_link.txt")
|
||||||
end
|
end
|
||||||
if eval('v:shell_error') == 1 then
|
if eval('v:shell_error') ~= 0 then
|
||||||
pending('Cannot create symlink', function()end)
|
pending('Cannot create symlink', function()end)
|
||||||
end
|
end
|
||||||
source([[
|
source([[
|
||||||
@ -60,7 +60,7 @@ describe(':write', function()
|
|||||||
else
|
else
|
||||||
command("silent !ln -s test_bkc_file.txt test_bkc_link.txt")
|
command("silent !ln -s test_bkc_file.txt test_bkc_link.txt")
|
||||||
end
|
end
|
||||||
if eval('v:shell_error') == 1 then
|
if eval('v:shell_error') ~= 0 then
|
||||||
pending('Cannot create symlink', function()end)
|
pending('Cannot create symlink', function()end)
|
||||||
end
|
end
|
||||||
source([[
|
source([[
|
||||||
|
@ -4,6 +4,9 @@ local eq, eval, command = helpers.eq, helpers.eval, helpers.command
|
|||||||
|
|
||||||
describe('Test for delete()', function()
|
describe('Test for delete()', function()
|
||||||
before_each(clear)
|
before_each(clear)
|
||||||
|
after_each(function()
|
||||||
|
os.remove('Xfile')
|
||||||
|
end)
|
||||||
|
|
||||||
it('file delete', function()
|
it('file delete', function()
|
||||||
command('split Xfile')
|
command('split Xfile')
|
||||||
@ -52,8 +55,7 @@ describe('Test for delete()', function()
|
|||||||
silent !ln -s Xfile Xlink
|
silent !ln -s Xfile Xlink
|
||||||
endif
|
endif
|
||||||
]])
|
]])
|
||||||
if eval('v:shell_error') == 1 then
|
if eval('v:shell_error') ~= 0 then
|
||||||
eq(0, eval("delete('Xfile')"))
|
|
||||||
pending('Cannot create symlink', function()end)
|
pending('Cannot create symlink', function()end)
|
||||||
end
|
end
|
||||||
-- Delete the link, not the file
|
-- Delete the link, not the file
|
||||||
|
Loading…
Reference in New Issue
Block a user