mirror of
https://github.com/neovim/neovim.git
synced 2024-12-26 14:11:15 -07:00
Merge #2819 'tests: Migrate legacy test argument_0count.'.
This commit is contained in:
commit
c83af3a88c
@ -30,7 +30,6 @@ SCRIPTS := test_eval.out \
|
||||
test_argument_count.out \
|
||||
test_close_count.out \
|
||||
test_command_count.out \
|
||||
test_argument_0count.out
|
||||
|
||||
SCRIPTS_GUI := test16.out
|
||||
|
||||
|
@ -1,28 +0,0 @@
|
||||
Tests for :0argadd and :0argedit vim: set ft=vim :
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:let arglists = []
|
||||
:%argd
|
||||
:arga a b c d
|
||||
:2argu
|
||||
:0arga added
|
||||
:call add(arglists, argv())
|
||||
:2argu
|
||||
:arga third
|
||||
:call add(arglists, argv())
|
||||
:%argd
|
||||
:arga a b c d
|
||||
:2argu
|
||||
:0arge edited
|
||||
:call add(arglists, argv())
|
||||
:2argu
|
||||
:arga third
|
||||
:call add(arglists, argv())
|
||||
:e! test.out
|
||||
:call append(0, map(copy(arglists), 'join(v:val, " ")'))
|
||||
:w
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
added a b c d
|
||||
added a third b c d
|
||||
edited a b c d
|
||||
edited a third b c d
|
||||
|
28
test/functional/legacy/argument_0count_spec.lua
Normal file
28
test/functional/legacy/argument_0count_spec.lua
Normal file
@ -0,0 +1,28 @@
|
||||
-- Tests for :0argadd and :0argedit
|
||||
|
||||
local helpers = require('test.functional.helpers')
|
||||
local eq, eval, clear, execute =
|
||||
helpers.eq, helpers.eval, helpers.clear, helpers.execute
|
||||
|
||||
describe('argument_0count', function()
|
||||
setup(clear)
|
||||
|
||||
it('is working', function()
|
||||
execute('arga a b c d')
|
||||
eq({'a', 'b', 'c', 'd'}, eval('argv()'))
|
||||
execute('2argu')
|
||||
execute('0arga added')
|
||||
eq({'added', 'a', 'b', 'c', 'd'}, eval('argv()'))
|
||||
execute('2argu')
|
||||
execute('arga third')
|
||||
eq({'added', 'a', 'third', 'b', 'c', 'd'}, eval('argv()'))
|
||||
execute('%argd')
|
||||
execute('arga a b c d')
|
||||
execute('2argu')
|
||||
execute('0arge edited')
|
||||
eq({'edited', 'a', 'b', 'c', 'd'}, eval('argv()'))
|
||||
execute('2argu')
|
||||
execute('arga third')
|
||||
eq({'edited', 'a', 'third', 'b', 'c', 'd'}, eval('argv()'))
|
||||
end)
|
||||
end)
|
Loading…
Reference in New Issue
Block a user