annotate src/testdir/test_excmd.vim @ 17650:a1437b8f2fac v8.1.1822

patch 8.1.1822: confusing error message when range is not allowed commit https://github.com/vim/vim/commit/0acae7acc40b9f12bff88d5e1dae494a761fec07 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 6 21:29:29 2019 +0200 patch 8.1.1822: confusing error message when range is not allowed Problem: Confusing error message when range is not allowed. Solution: With ADDR_NONE give e_norange. Change e_invaddr to e_invrange for consistency.
author Bram Moolenaar <Bram@vim.org>
date Tue, 06 Aug 2019 21:30:06 +0200
parents c8152af9fa33
children 18d7337b6837
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17496
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Tests for various Ex commands.
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 func Test_ex_delete()
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 new
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 call setline(1, ['a', 'b', 'c'])
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 2
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 " :dl is :delete with the "l" flag, not :dlist
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 .dl
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 call assert_equal(['a', 'c'], getline(1, 2))
c8152af9fa33 patch 8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 endfunc
17650
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
11
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
12 func Test_range_error()
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
13 call assert_fails(':.echo 1', 'E481:')
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
14 call assert_fails(':$echo 1', 'E481:')
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
15 call assert_fails(':1,2echo 1', 'E481:')
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
16 call assert_fails(':+1echo 1', 'E481:')
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
17 call assert_fails(':/1/echo 1', 'E481:')
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
18 call assert_fails(':\/echo 1', 'E481:')
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
19 normal vv
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
20 call assert_fails(":'<,'>echo 1", 'E481:')
a1437b8f2fac patch 8.1.1822: confusing error message when range is not allowed
Bram Moolenaar <Bram@vim.org>
parents: 17496
diff changeset
21 endfunc