aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/command_count_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2016-06-23 11:15:08 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2016-06-23 16:54:19 +0200
commite8a8342132d47a0f5b94248049238bf16b23715e (patch)
tree64b24b4f61001c9c892c1e8eaf91e8203d848ff7 /test/functional/legacy/command_count_spec.lua
parentc475e3f8d165e91cbafe4e34ae1ca3c857533703 (diff)
downloadrneovim-e8a8342132d47a0f5b94248049238bf16b23715e.tar.gz
rneovim-e8a8342132d47a0f5b94248049238bf16b23715e.tar.bz2
rneovim-e8a8342132d47a0f5b94248049238bf16b23715e.zip
test: fix command_count_spec
The test hit wait_return if x or .x.swp exists in the project root directory.
Diffstat (limited to 'test/functional/legacy/command_count_spec.lua')
-rw-r--r--test/functional/legacy/command_count_spec.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/functional/legacy/command_count_spec.lua b/test/functional/legacy/command_count_spec.lua
index 618dc1dc99..c463ada968 100644
--- a/test/functional/legacy/command_count_spec.lua
+++ b/test/functional/legacy/command_count_spec.lua
@@ -2,24 +2,19 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, source, expect = helpers.clear, helpers.source, helpers.expect
-local execute, spawn = helpers.execute, helpers.spawn
-local nvim_prog = helpers.nvim_prog
+local execute = helpers.execute
describe('command_count', function()
- setup(clear)
- teardown(function()
- os.remove('test.out')
- end)
-
it('is working', function()
-- It is relevant for the test to load a file initially. If this is
-- emulated with :arg the buffer count is wrong as nvim creates an empty
-- buffer if it was started without a filename.
- local nvim2 = spawn({nvim_prog, '-u', 'NONE', '-i', 'NONE', '--embed',
- 'test_command_count.in'})
- helpers.set_session(nvim2)
+ clear('test_command_count.in')
source([[
+ let g:tmpname = tempname()
+ call mkdir(g:tmpname)
+ execute "cd ".g:tmpname
lang C
let g:lines = []
com -range=% RangeLines
@@ -239,5 +234,10 @@ describe('command_count', function()
bufdo: 2 3 4 5 6 7 8 9 10 15
bufdo: 4 5 6 7
tabdo: 2 3 4]])
+
+ source([[
+ cd ..
+ call delete(g:tmpname, 'rf')
+ ]])
end)
end)