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 19:02:40 +0200
committerGitHub <noreply@github.com>2016-06-23 19:02:40 +0200
commit65af001f2bcc35f19d64b4d2c1dbcd46d87432e8 (patch)
tree64b24b4f61001c9c892c1e8eaf91e8203d848ff7 /test/functional/legacy/command_count_spec.lua
parentc475e3f8d165e91cbafe4e34ae1ca3c857533703 (diff)
parente8a8342132d47a0f5b94248049238bf16b23715e (diff)
downloadrneovim-65af001f2bcc35f19d64b4d2c1dbcd46d87432e8.tar.gz
rneovim-65af001f2bcc35f19d64b4d2c1dbcd46d87432e8.tar.bz2
rneovim-65af001f2bcc35f19d64b4d2c1dbcd46d87432e8.zip
Merge pull request #4952 from bfredl/counttest
test: fix command_count_spec
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)