aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-05-18 19:30:15 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-05-24 22:11:14 -0400
commit64177e3e98371b9afad44ffa47f1a0b694c5742a (patch)
treeb11fae3b7537b2fe8b8e4e5002bfbd332c52ad87
parent209f05b48745e5e077d4d34ea7013d7bb20463de (diff)
downloadrneovim-64177e3e98371b9afad44ffa47f1a0b694c5742a.tar.gz
rneovim-64177e3e98371b9afad44ffa47f1a0b694c5742a.tar.bz2
rneovim-64177e3e98371b9afad44ffa47f1a0b694c5742a.zip
win: test: don't test symlink if not admin user
-rw-r--r--test/functional/ex_cmds/write_spec.lua6
-rw-r--r--test/functional/legacy/delete_spec.lua4
2 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/ex_cmds/write_spec.lua b/test/functional/ex_cmds/write_spec.lua
index 8702f40929..3060fb063b 100644
--- a/test/functional/ex_cmds/write_spec.lua
+++ b/test/functional/ex_cmds/write_spec.lua
@@ -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'])
diff --git a/test/functional/legacy/delete_spec.lua b/test/functional/legacy/delete_spec.lua
index 5ef456bfe3..b69caa6ef7 100644
--- a/test/functional/legacy/delete_spec.lua
+++ b/test/functional/legacy/delete_spec.lua
@@ -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')"))