view src/testdir/test_argument_count.in @ 7313:2062247be2d0 v7.4.962

commit https://github.com/vim/vim/commit/3f12a2421bda43a4e48c822541b75f72ee11125a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 5 20:56:57 2015 +0100 patch 7.4.962 Problem: Cannot run the tests with gvim. Cannot run individual new stests. Solution: Add the -f flag. Add new test targets in Makefile.
author Christian Brabandt <cb@256bit.org>
date Sat, 05 Dec 2015 21:00:05 +0100
parents 22f95a018b13
children
line wrap: on
line source

Tests for :[count]argument! and :[count]argdelete     vim: set ft=vim :

STARTTEST
:so small.vim
:%argd
:argadd a b c d
:set hidden
:let buffers = []
:augroup TEST
:au BufEnter * call add(buffers, expand('%:t'))
:augroup END
:$argu
:$-argu
:-argu
:1argu
:+2argu
:augroup TEST
:au!
:augroup END
:let arglists = []
:.argd
:call add(arglists, argv())
:-argd
:call add(arglists, argv())
:$argd
:call add(arglists, argv())
:1arga c
:1arga b
:$argu
:$arga x
:call add(arglists, argv())
:0arga Y
:call add(arglists, argv())
:%argd
:call add(arglists, argv())
:arga a b c d e f
:2,$-argd
:call add(arglists, argv())
:e! test.out
:call append(0, buffers)
:let lnr = line('$')
:call append(lnr, map(copy(arglists), 'join(v:val, " ")'))
:w
:qa!
ENDTEST