aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-31 19:56:15 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 04:30:55 -0500
commitf3c242c13cc9aaefd29f750d211fff76e1fada68 (patch)
tree5096f59f4d61c1493d37456fb8cb890f8a281d1e /src/nvim/testdir
parentcf3a8610172feec1fb8ab2863bdad69eb1296f28 (diff)
downloadrneovim-f3c242c13cc9aaefd29f750d211fff76e1fada68.tar.gz
rneovim-f3c242c13cc9aaefd29f750d211fff76e1fada68.tar.bz2
rneovim-f3c242c13cc9aaefd29f750d211fff76e1fada68.zip
vim-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. https://github.com/vim/vim/commit/b731689e85b4153af7edc8f0a6b9f99d36d8b011 Use Lua's "assert()" to make an invalid command definition a compilation error. Misc changes: Remove 'RESTRICT' flag. Neovim does not support "restricted" mode since commit 7777532cebcfa9abc5ab2c7beae77f386feed3ca. TODO: Do not generate files before Lua assertions so that CMake always runs the generator script if the previous build has an invalid command definition.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_usercommands.vim10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_usercommands.vim b/src/nvim/testdir/test_usercommands.vim
index 0a89066a2b..4621207d19 100644
--- a/src/nvim/testdir/test_usercommands.vim
+++ b/src/nvim/testdir/test_usercommands.vim
@@ -393,9 +393,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
@@ -421,7 +425,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.