mirror of
https://github.com/vim/vim.git
synced 2025-11-13 22:54:27 -05:00
Problem: Confusing error message when range is not allowed.
Solution: With ADDR_NONE give e_norange. Change e_invaddr to e_invrange for
consistency.
22 lines
553 B
VimL
22 lines
553 B
VimL
" Tests for various Ex commands.
|
|
|
|
func Test_ex_delete()
|
|
new
|
|
call setline(1, ['a', 'b', 'c'])
|
|
2
|
|
" :dl is :delete with the "l" flag, not :dlist
|
|
.dl
|
|
call assert_equal(['a', 'c'], getline(1, 2))
|
|
endfunc
|
|
|
|
func Test_range_error()
|
|
call assert_fails(':.echo 1', 'E481:')
|
|
call assert_fails(':$echo 1', 'E481:')
|
|
call assert_fails(':1,2echo 1', 'E481:')
|
|
call assert_fails(':+1echo 1', 'E481:')
|
|
call assert_fails(':/1/echo 1', 'E481:')
|
|
call assert_fails(':\/echo 1', 'E481:')
|
|
normal vv
|
|
call assert_fails(":'<,'>echo 1", 'E481:')
|
|
endfunc
|