vim-patch:8.0.1738: ":args" output is hard to read

Problem:    ":args" output is hard to read.
Solution:   Make columns with the names if the output is more than one line.
5d69da462f

vim-patch:8.0.1740: warning for signed-unsigned incompatibility

Problem:    Warning for signed-unsigned incompatibility.
Solution:   Change type from "char *" to "char_u *". (John Marriott)
405dadb63e

Removes ported legacy test that was re-added later.
Ref: https://github.com/neovim/neovim/pull/10147#issuecomment-512609513
This commit is contained in:
Daniel Hahler
2019-06-08 11:35:53 +02:00
parent 8fc93241d6
commit e134cc9d4a
4 changed files with 101 additions and 114 deletions

View File

@@ -92,74 +92,6 @@ describe('argument list commands', function()
eq(0, eval('len(argv())'))
end)
it('test for [count]argument and [count]argdelete commands', function()
reset_arglist()
command('let save_hidden = &hidden')
command('set hidden')
command('let g:buffers = []')
command('augroup TEST')
command([[au BufEnter * call add(buffers, expand('%:t'))]])
command('augroup END')
command('argadd a b c d')
command('$argu')
command('$-argu')
command('-argu')
command('1argu')
command('+2argu')
command('augroup TEST')
command('au!')
command('augroup END')
eq({'d', 'c', 'b', 'a', 'c'}, eval('g:buffers'))
command('redir => result')
command('ar')
command('redir END')
eq(1, eval([[result =~# 'a b \[c] d']]))
command('.argd')
eq({'a', 'b', 'd'}, eval('argv()'))
command('-argd')
eq({'a', 'd'}, eval('argv()'))
command('$argd')
eq({'a'}, eval('argv()'))
command('1arga c')
command('1arga b')
command('$argu')
command('$arga x')
eq({'a', 'b', 'c', 'x'}, eval('argv()'))
command('0arga Y')
eq({'Y', 'a', 'b', 'c', 'x'}, eval('argv()'))
command('%argd')
eq({}, eval('argv()'))
command('arga a b c d e f')
command('2,$-argd')
eq({'a', 'f'}, eval('argv()'))
command('let &hidden = save_hidden')
-- Setting the argument list should fail when the current buffer has
-- unsaved changes
command('%argd')
command('enew!')
command('set modified')
assert_fails('args x y z', 'E37:')
command('args! x y z')
eq({'x', 'y', 'z'}, eval('argv()'))
eq('x', eval('expand("%:t")'))
command('%argdelete')
assert_fails('argument', 'E163:')
end)
it('test for 0argadd and 0argedit', function()
reset_arglist()