annotate src/testdir/test_history.vim @ 19783:546bdeef35f1 v8.2.0448

patch 8.2.0448: various functions not properly tested Commit: https://github.com/vim/vim/commit/0e05de46226eb4e5ea580beefa71831f92d613d3 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 25 22:23:46 2020 +0100 patch 8.2.0448: various functions not properly tested Problem: Various functions not properly tested. Solution: Add more tests, especially for failures. (Yegappan Lakshmanan, closes #5843)
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 Mar 2020 22:30:04 +0100
parents 848dc460adf0
children 595ea7f099cd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8406
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Tests for the history functions
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
17089
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
3 source check.vim
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
4 CheckFeature cmdline_hist
8406
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 set history=7
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 function History_Tests(hist)
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 " First clear the history
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 call histadd(a:hist, 'dummy')
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 call assert_true(histdel(a:hist))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 call assert_equal(-1, histnr(a:hist))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 call assert_equal('', histget(a:hist))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14
17914
af3d441845cd patch 8.1.1953: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
15 call assert_true('ls'->histadd(a:hist))
8406
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 call assert_true(histadd(a:hist, 'buffers'))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 call assert_equal('buffers', histget(a:hist))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 call assert_equal('ls', histget(a:hist, -2))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 call assert_equal('ls', histget(a:hist, 1))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 call assert_equal('', histget(a:hist, 5))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 call assert_equal('', histget(a:hist, -5))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 call assert_equal(2, histnr(a:hist))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 call assert_true(histdel(a:hist, 2))
17914
af3d441845cd patch 8.1.1953: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
24 call assert_false(a:hist->histdel(7))
8406
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 call assert_equal(1, histnr(a:hist))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 call assert_equal('ls', histget(a:hist, -1))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 call assert_true(histadd(a:hist, 'buffers'))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 call assert_true(histadd(a:hist, 'ls'))
17914
af3d441845cd patch 8.1.1953: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
30 call assert_equal('ls', a:hist->histget(-1))
af3d441845cd patch 8.1.1953: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
31 call assert_equal(4, a:hist->histnr())
8406
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32
10434
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
33 let a=execute('history ' . a:hist)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
34 call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
35 let a=execute('history all')
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
36 call assert_match("^\n # .* history\n 3 buffers\n> 4 ls", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
37
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
38 if len(a:hist) > 0
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
39 let a=execute('history ' . a:hist . ' 2')
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
40 call assert_match("^\n # \\S* history$", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
41 let a=execute('history ' . a:hist . ' 3')
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
42 call assert_match("^\n # \\S* history\n 3 buffers$", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
43 let a=execute('history ' . a:hist . ' 4')
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
44 call assert_match("^\n # \\S* history\n> 4 ls$", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
45 let a=execute('history ' . a:hist . ' 3,4')
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
46 call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
47 let a=execute('history ' . a:hist . ' -1')
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
48 call assert_match("^\n # \\S* history\n> 4 ls$", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
49 let a=execute('history ' . a:hist . ' -2')
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
50 call assert_match("^\n # \\S* history\n 3 buffers$", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
51 let a=execute('history ' . a:hist . ' -2,')
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
52 call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
53 let a=execute('history ' . a:hist . ' -3')
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
54 call assert_match("^\n # \\S* history$", a)
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
55 endif
f3bb76ec4155 commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents: 8406
diff changeset
56
8406
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 " Test for removing entries matching a pattern
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 for i in range(1, 3)
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 call histadd(a:hist, 'text_' . i)
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 endfor
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 call assert_true(histdel(a:hist, 'text_\d\+'))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 call assert_equal('ls', histget(a:hist, -1))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 " Test for freeing the entire history list
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 for i in range(1, 7)
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 call histadd(a:hist, 'text_' . i)
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 endfor
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 call histdel(a:hist)
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 for i in range(1, 7)
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 call assert_equal('', histget(a:hist, i))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 call assert_equal('', histget(a:hist, i - 7 - 1))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 endfor
19536
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
73
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
74 " Test for freeing an entry at the beginning of the history list
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
75 for i in range(1, 4)
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
76 call histadd(a:hist, 'text_' . i)
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
77 endfor
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
78 call histdel(a:hist, 1)
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
79 call assert_equal('', histget(a:hist, 1))
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
80 call assert_equal('text_4', histget(a:hist, 4))
8406
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 endfunction
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 function Test_History()
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 for h in ['cmd', ':', '', 'search', '/', '?', 'expr', '=', 'input', '@', 'debug', '>']
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 call History_Tests(h)
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 endfor
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88 " Negative tests
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 call assert_false(histdel('abc'))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 call assert_equal('', histget('abc'))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 call assert_fails('call histdel([])', 'E730:')
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92 call assert_equal('', histget(10))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 call assert_fails('call histget([])', 'E730:')
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 call assert_equal(-1, histnr('abc'))
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95 call assert_fails('call histnr([])', 'E730:')
19517
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
96 call assert_fails('history xyz', 'E488:')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
97 call assert_fails('history ,abc', 'E488:')
8406
5d926807c19c commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 endfunction
10565
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
99
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
100 function Test_Search_history_window()
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
101 new
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
102 call setline(1, ['a', 'b', 'a', 'b'])
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
103 1
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
104 call feedkeys("/a\<CR>", 'xt')
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
105 call assert_equal('a', getline('.'))
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
106 1
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
107 call feedkeys("/b\<CR>", 'xt')
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
108 call assert_equal('b', getline('.'))
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
109 1
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
110 " select the previous /a command
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
111 call feedkeys("q/kk\<CR>", 'x!')
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
112 call assert_equal('a', getline('.'))
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
113 call assert_equal('a', @/)
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
114 bwipe!
ea0dadb041c9 patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents: 10434
diff changeset
115 endfunc
15097
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 10565
diff changeset
116
19570
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
117 " Test for :history command option completion
15097
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 10565
diff changeset
118 function Test_history_completion()
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 10565
diff changeset
119 call feedkeys(":history \<C-A>\<C-B>\"\<CR>", 'tx')
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 10565
diff changeset
120 call assert_equal('"history / : = > ? @ all cmd debug expr input search', @:)
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 10565
diff changeset
121 endfunc
19517
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
122
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
123 " Test for increasing the 'history' option value
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
124 func Test_history_size()
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
125 let save_histsz = &history
19570
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
126 set history=10
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
127 call histadd(':', 'ls')
19517
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
128 call histdel(':')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
129 for i in range(1, 5)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
130 call histadd(':', 'cmd' .. i)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
131 endfor
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
132 call assert_equal(5, histnr(':'))
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
133 call assert_equal('cmd5', histget(':', -1))
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
134
19536
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
135 set history=15
19517
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
136 for i in range(6, 10)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
137 call histadd(':', 'cmd' .. i)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
138 endfor
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
139 call assert_equal(10, histnr(':'))
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
140 call assert_equal('cmd1', histget(':', 1))
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
141 call assert_equal('cmd10', histget(':', -1))
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
142
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
143 set history=5
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
144 call histadd(':', 'abc')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
145 call assert_equal('', histget(':', 6))
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
146 call assert_equal('', histget(':', 12))
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
147 call assert_equal('cmd7', histget(':', 7))
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
148 call assert_equal('abc', histget(':', -1))
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
149
19536
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
150 " This test works only when the language is English
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
151 if v:lang == "C" || v:lang =~ '^[Ee]n'
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
152 set history=0
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
153 redir => v
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
154 call feedkeys(":history\<CR>", 'xt')
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
155 redir END
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
156 call assert_equal(["'history' option is zero"], split(v, "\n"))
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
157 endif
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
158
19517
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
159 let &history=save_histsz
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
160 endfunc
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
161
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
162 " Test for recalling old search patterns in /
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
163 func Test_history_search()
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
164 call histdel('/')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
165 let g:pat = []
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
166 func SavePat()
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
167 call add(g:pat, getcmdline())
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
168 return ''
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
169 endfunc
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
170 cnoremap <F2> <C-\>eSavePat()<CR>
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
171 call histadd('/', 'pat1')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
172 call histadd('/', 'pat2')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
173 let @/ = ''
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
174 call feedkeys("/\<Up>\<F2>\<Up>\<F2>\<Down>\<Down>\<F2>\<Esc>", 'xt')
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
175 call assert_equal(['pat2', 'pat1', ''], g:pat)
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
176 cunmap <F2>
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
177 delfunc SavePat
19570
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
178
19581
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
179 " Search for a pattern that is not present in the history
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
180 call assert_beeps('call feedkeys("/a1b2\<Up>\<CR>", "xt")')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
181
19570
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
182 " Recall patterns with 'history' set to 0
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
183 set history=0
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
184 let @/ = 'abc'
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
185 let cmd = 'call feedkeys("/\<Up>\<Down>\<S-Up>\<S-Down>\<CR>", "xt")'
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
186 call assert_fails(cmd, 'E486:')
43c04edcafec patch 8.2.0342: some code in ex_getln.c not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19536
diff changeset
187 set history&
19581
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
188
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
189 " Recall patterns till the end of history
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
190 set history=4
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
191 call histadd('/', 'pat')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
192 call histdel('/')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
193 call histadd('/', 'pat1')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
194 call histadd('/', 'pat2')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
195 call assert_beeps('call feedkeys("/\<Up>\<Up>\<Up>\<C-U>\<cr>", "xt")')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
196 call assert_beeps('call feedkeys("/\<Down><cr>", "xt")')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
197
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
198 " Test for wrapping around the history list
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
199 for i in range(3, 7)
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
200 call histadd('/', 'pat' .. i)
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
201 endfor
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
202 let upcmd = "\<up>\<up>\<up>\<up>\<up>"
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
203 let downcmd = "\<down>\<down>\<down>\<down>\<down>"
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
204 try
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
205 call feedkeys("/" .. upcmd .. "\<cr>", 'xt')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
206 catch /E486:/
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
207 endtry
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
208 call assert_equal('pat4', @/)
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
209 try
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
210 call feedkeys("/" .. upcmd .. downcmd .. "\<cr>", 'xt')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
211 catch /E486:/
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
212 endtry
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
213 call assert_equal('pat4', @/)
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
214
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
215 " Test for changing the search command separator in the history
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
216 call assert_fails('call feedkeys("/def/\<cr>", "xt")', 'E486:')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
217 call assert_fails('call feedkeys("?\<up>\<cr>", "xt")', 'E486:')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
218 call assert_equal('def?', histget('/', -1))
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
219
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
220 call assert_fails('call feedkeys("/ghi?\<cr>", "xt")', 'E486:')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
221 call assert_fails('call feedkeys("?\<up>\<cr>", "xt")', 'E486:')
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
222 call assert_equal('ghi\?', histget('/', -1))
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
223
848dc460adf0 patch 8.2.0347: various code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19570
diff changeset
224 set history&
19517
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
225 endfunc
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
226
19536
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
227 " Test for making sure the key value is not stored in history
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
228 func Test_history_crypt_key()
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
229 CheckFeature cryptv
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
230 call feedkeys(":set bs=2 key=abc ts=8\<CR>", 'xt')
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
231 call assert_equal('set bs=2 key= ts=8', histget(':'))
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
232 set key& bs& ts&
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
233 endfunc
bab20768e1fd patch 8.2.0325: ex_getln.c code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19517
diff changeset
234
19517
738a4fe2c8c5 patch 8.2.0316: ex_getln.c code has insufficient test coverage
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
235 " vim: shiftwidth=2 sts=2 expandtab