Mercurial > vim
comparison src/testdir/test_mapping.vim @ 16389:fb7cf38a1c7a v8.1.1199
patch 8.1.1199: no test for :abclear
commit https://github.com/vim/vim/commit/8485be4e49ed6c157d7349920992643fd1ab5c3b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 23 16:36:05 2019 +0200
patch 8.1.1199: no test for :abclear
Problem: No test for :abclear.
Solution: Add a test. (Dominique Pelle, closes https://github.com/vim/vim/issues/4292)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 23 Apr 2019 16:45:04 +0200 |
parents | 5c5d211bd5a8 |
children | a5c3d374e1d3 |
comparison
equal
deleted
inserted
replaced
16388:a4101e185bbb | 16389:fb7cf38a1c7a |
---|---|
7 inoreab чкпр vim | 7 inoreab чкпр vim |
8 call feedkeys("Goчкпр \<Esc>", "xt") | 8 call feedkeys("Goчкпр \<Esc>", "xt") |
9 call assert_equal('vim ', getline('$')) | 9 call assert_equal('vim ', getline('$')) |
10 iunab чкпр | 10 iunab чкпр |
11 set nomodified | 11 set nomodified |
12 endfunc | |
13 | |
14 func Test_abclear() | |
15 abbrev foo foobar | |
16 iabbrev fooi foobari | |
17 cabbrev fooc foobarc | |
18 call assert_equal("\n\n" | |
19 \ .. "c fooc foobarc\n" | |
20 \ .. "i fooi foobari\n" | |
21 \ .. "! foo foobar", execute('abbrev')) | |
22 | |
23 iabclear | |
24 call assert_equal("\n\n" | |
25 \ .. "c fooc foobarc\n" | |
26 \ .. "c foo foobar", execute('abbrev')) | |
27 abbrev foo foobar | |
28 iabbrev fooi foobari | |
29 | |
30 cabclear | |
31 call assert_equal("\n\n" | |
32 \ .. "i fooi foobari\n" | |
33 \ .. "i foo foobar", execute('abbrev')) | |
34 abbrev foo foobar | |
35 cabbrev fooc foobarc | |
36 | |
37 abclear | |
38 call assert_equal("\n\nNo abbreviation found", execute('abbrev')) | |
39 endfunc | |
40 | |
41 func Test_abclear_buffer() | |
42 abbrev foo foobar | |
43 new X1 | |
44 abbrev <buffer> foo1 foobar1 | |
45 new X2 | |
46 abbrev <buffer> foo2 foobar2 | |
47 | |
48 call assert_equal("\n\n" | |
49 \ .. "! foo2 @foobar2\n" | |
50 \ .. "! foo foobar", execute('abbrev')) | |
51 | |
52 abclear <buffer> | |
53 call assert_equal("\n\n" | |
54 \ .. "! foo foobar", execute('abbrev')) | |
55 | |
56 b X1 | |
57 call assert_equal("\n\n" | |
58 \ .. "! foo1 @foobar1\n" | |
59 \ .. "! foo foobar", execute('abbrev')) | |
60 abclear <buffer> | |
61 call assert_equal("\n\n" | |
62 \ .. "! foo foobar", execute('abbrev')) | |
63 | |
64 abclear | |
65 call assert_equal("\n\nNo abbreviation found", execute('abbrev')) | |
66 | |
67 %bwipe | |
12 endfunc | 68 endfunc |
13 | 69 |
14 func Test_map_ctrl_c_insert() | 70 func Test_map_ctrl_c_insert() |
15 " mapping of ctrl-c in Insert mode | 71 " mapping of ctrl-c in Insert mode |
16 set cpo-=< cpo-=k | 72 set cpo-=< cpo-=k |