aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-05-26 11:14:59 +0200
committerGitHub <noreply@github.com>2018-05-26 11:14:59 +0200
commit438f2b64747da04875f65eb5a3497cc6e55fa078 (patch)
treedb3743345c4b071f6517fabadc0452c642fb4054 /test/functional/legacy
parentd2c460638c7dad1253c672e91d889003b79428bc (diff)
parente21f454e116441443208f5c31beb01f67191b47a (diff)
downloadrneovim-438f2b64747da04875f65eb5a3497cc6e55fa078.tar.gz
rneovim-438f2b64747da04875f65eb5a3497cc6e55fa078.tar.bz2
rneovim-438f2b64747da04875f65eb5a3497cc6e55fa078.zip
Merge #8436 win: test: cleanup on exit'
Diffstat (limited to 'test/functional/legacy')
-rw-r--r--test/functional/legacy/011_autocommands_spec.lua5
-rw-r--r--test/functional/legacy/097_glob_path_spec.lua2
-rw-r--r--test/functional/legacy/delete_spec.lua6
3 files changed, 10 insertions, 3 deletions
diff --git a/test/functional/legacy/011_autocommands_spec.lua b/test/functional/legacy/011_autocommands_spec.lua
index c2667d28d2..379646b2ba 100644
--- a/test/functional/legacy/011_autocommands_spec.lua
+++ b/test/functional/legacy/011_autocommands_spec.lua
@@ -17,9 +17,10 @@ local lfs = require('lfs')
local clear, feed_command, expect, eq, neq, dedent, write_file, feed =
helpers.clear, helpers.feed_command, helpers.expect, helpers.eq, helpers.neq,
helpers.dedent, helpers.write_file, helpers.feed
+local iswin = helpers.iswin
local function has_gzip()
- local null = helpers.iswin() and 'nul' or '/dev/null'
+ local null = iswin() and 'nul' or '/dev/null'
return os.execute('gzip --help >' .. null .. ' 2>&1') == 0
end
@@ -59,7 +60,7 @@ describe('file reading, writing and bufnew and filter autocommands', function()
os.remove('test.out')
end)
- if not has_gzip() then
+ if iswin() or not has_gzip() then
pending('skipped (missing `gzip` utility)', function() end)
else
diff --git a/test/functional/legacy/097_glob_path_spec.lua b/test/functional/legacy/097_glob_path_spec.lua
index 907f0665ae..ccd93fed60 100644
--- a/test/functional/legacy/097_glob_path_spec.lua
+++ b/test/functional/legacy/097_glob_path_spec.lua
@@ -74,7 +74,7 @@ describe('glob() and globpath()', function()
teardown(function()
if helpers.iswin() then
os.execute('del /q/f Xxx{ Xxx$')
- os.execute('rd /q sautest')
+ os.execute('rd /q /s sautest')
else
os.execute("rm -rf sautest Xxx{ Xxx$")
end
diff --git a/test/functional/legacy/delete_spec.lua b/test/functional/legacy/delete_spec.lua
index 5ef456bfe3..9ea3269828 100644
--- a/test/functional/legacy/delete_spec.lua
+++ b/test/functional/legacy/delete_spec.lua
@@ -4,6 +4,9 @@ local eq, eval, command = helpers.eq, helpers.eval, helpers.command
describe('Test for delete()', function()
before_each(clear)
+ after_each(function()
+ os.remove('Xfile')
+ end)
it('file delete', function()
command('split Xfile')
@@ -52,6 +55,9 @@ describe('Test for delete()', function()
silent !ln -s Xfile Xlink
endif
]])
+ if eval('v:shell_error') ~= 0 then
+ pending('Cannot create symlink', function()end)
+ end
-- Delete the link, not the file
eq(0, eval("delete('Xlink')"))
eq(-1, eval("delete('Xlink')"))