Mercurial > vim
diff src/testdir/test_usercommands.vim @ 16475:854fb0ad4be6 v8.1.1241
patch 8.1.1241: Ex command info contains confusing information
commit https://github.com/vim/vim/commit/b731689e85b4153af7edc8f0a6b9f99d36d8b011
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 1 18:08:42 2019 +0200
patch 8.1.1241: Ex command info contains confusing information
Problem: Ex command info contains confusing information.
Solution: When using the NOTADR flag use ADDR_OTHER for the address type.
Cleanup code using NOTADR. Check for errors in
create_cmdidxs.vim. Adjust Makefile to see the errors.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 May 2019 18:15:07 +0200 |
parents | 4734d601ebdd |
children | 9199f34d838e |
line wrap: on
line diff
--- a/src/testdir/test_usercommands.vim +++ b/src/testdir/test_usercommands.vim @@ -392,9 +392,13 @@ func Test_addr_all() call assert_equal(len(gettabinfo()), g:a2) bwipe - command! -addr=other DoSomething echo 'nothing' + command! -addr=other DoSomething let g:a1 = <line1> | let g:a2 = <line2> DoSomething - call assert_fails('%DoSomething') + call assert_equal(line('.'), g:a1) + call assert_equal(line('.'), g:a2) + %DoSomething + call assert_equal(1, g:a1) + call assert_equal(line('$'), g:a2) delcommand DoSomething endfunc @@ -420,7 +424,7 @@ func Test_command_list() \ execute('command DoCmd')) command! -count=2 DoCmd : call assert_equal("\n Name Args Address Complete Definition" - \ .. "\n DoCmd 0 2c :", + \ .. "\n DoCmd 0 2c ? :", \ execute('command DoCmd')) " Test with various -addr= argument values.