diff options
Diffstat (limited to 'test/functional/legacy')
-rw-r--r-- | test/functional/legacy/011_autocommands_spec.lua | 5 | ||||
-rw-r--r-- | test/functional/legacy/097_glob_path_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/legacy/delete_spec.lua | 6 |
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')")) |