diff options
| author | Daniel Hahler <git@thequod.de> | 2019-06-08 11:35:53 +0200 |
|---|---|---|
| committer | Daniel Hahler <git@thequod.de> | 2019-07-24 06:09:28 +0200 |
| commit | e134cc9d4a13034401a1323e0515ceb19d43dfea (patch) | |
| tree | 1eb5b729261951fa1747f91a1db3d9dfe03978fb /src/nvim/testdir | |
| parent | 8fc93241d680f7c73e3013d679adb70c09cb3d57 (diff) | |
| download | rneovim-e134cc9d4a13034401a1323e0515ceb19d43dfea.tar.gz rneovim-e134cc9d4a13034401a1323e0515ceb19d43dfea.tar.bz2 rneovim-e134cc9d4a13034401a1323e0515ceb19d43dfea.zip | |
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.
https://github.com/vim/vim/commit/5d69da462f584a3aefb3427b127334bf9af3a4b0
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)
https://github.com/vim/vim/commit/405dadb63ea2b7aa4c8c659807506a35a8a9504c
Removes ported legacy test that was re-added later.
Ref: https://github.com/neovim/neovim/pull/10147#issuecomment-512609513
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_arglist.vim | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim index 6468819198..6628a74b3c 100644 --- a/src/nvim/testdir/test_arglist.vim +++ b/src/nvim/testdir/test_arglist.vim @@ -123,9 +123,9 @@ func Test_argument() call assert_equal(['d', 'c', 'b', 'a', 'c'], g:buffers) redir => result - ar + args redir END - call assert_true(result =~# 'a b \[c] d') + call assert_equal('a b [c] d', trim(result)) .argd call assert_equal(['a', 'b', 'd'], argv()) @@ -180,6 +180,34 @@ func Test_args_with_quote() endif endfunc +func Test_list_arguments() + " Clean the argument list + arga a | %argd + + " four args half the screen width makes two lines with two columns + let aarg = repeat('a', &columns / 2 - 4) + let barg = repeat('b', &columns / 2 - 4) + let carg = repeat('c', &columns / 2 - 4) + let darg = repeat('d', &columns / 2 - 4) + exe 'argadd ' aarg barg carg darg + + redir => result + args + redir END + call assert_match('\[' . aarg . '] \+' . carg . '\n' . barg . ' \+' . darg, trim(result)) + + " if one arg is longer than half the screen make one column + exe 'argdel' aarg + let aarg = repeat('a', &columns / 2 + 2) + exe '0argadd' aarg + redir => result + args + redir END + call assert_match(aarg . '\n\[' . barg . ']\n' . carg . '\n' . darg, trim(result)) + + %argdelete +endfunc + " Test for 0argadd and 0argedit " Ported from the test_argument_0count.in test script func Test_zero_argadd() |