tests: Migrate legacy test argument_0count.

This commit is contained in:
Lucas Hoffmann
2015-06-11 01:01:22 +02:00
committed by Justin M. Keyes
parent 34fdb11e53
commit a15ba262e4
4 changed files with 38 additions and 34 deletions

View File

@@ -30,7 +30,6 @@ SCRIPTS := test_eval.out \
test_argument_count.out \ test_argument_count.out \
test_close_count.out \ test_close_count.out \
test_command_count.out \ test_command_count.out \
test_argument_0count.out
SCRIPTS_GUI := test16.out SCRIPTS_GUI := test16.out

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,38 @@
-- Tests for :0argadd and :0argedit
local helpers = require('test.functional.helpers')
local source, clear, expect = helpers.source, helpers.clear, helpers.expect
describe('argument_0count', function()
setup(clear)
it('is working', function()
source([[
let arglists = []
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())
call append(0, map(copy(arglists), 'join(v:val, " ")'))
]])
-- Assert buffer contents.
expect([=[
added a b c d
added a third b c d
edited a b c d
edited a third b c d
]=])
end)
end)