win: test: don't test symlink if not admin user

This commit is contained in:
Jan Edmund Lazo 2018-05-18 19:30:15 -04:00
parent 209f05b487
commit 64177e3e98
2 changed files with 10 additions and 0 deletions

View File

@ -40,6 +40,9 @@ describe(':write', function()
else
command("silent !ln -s test_bkc_file.txt test_bkc_link.txt")
end
if eval('v:shell_error') == 1 then
pending('Cannot create symlink', function()end)
end
source([[
edit test_bkc_link.txt
call setline(1, ['content1'])
@ -57,6 +60,9 @@ describe(':write', function()
else
command("silent !ln -s test_bkc_file.txt test_bkc_link.txt")
end
if eval('v:shell_error') == 1 then
pending('Cannot create symlink', function()end)
end
source([[
edit test_bkc_link.txt
call setline(1, ['content1'])

View File

@ -52,6 +52,10 @@ describe('Test for delete()', function()
silent !ln -s Xfile Xlink
endif
]])
if eval('v:shell_error') == 1 then
eq(0, eval("delete('Xfile')"))
pending('Cannot create symlink', function()end)
end
-- Delete the link, not the file
eq(0, eval("delete('Xlink')"))
eq(-1, eval("delete('Xlink')"))