Mercurial > vim
annotate src/testdir/test_history.vim @ 16507:7c6fe15778cf v8.1.1257
patch 8.1.1257: MSVC: name of object directory now always right
commit https://github.com/vim/vim/commit/819d3e52a1eab35409ea7e0ebdb2340507a42684
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 3 22:15:03 2019 +0200
patch 8.1.1257: MSVC: name of object directory now always right
Problem: MSVC: name of object directory now always right.
Solution: Adjust comment. Don't use different directory for DIRECTX. Do
use different directory for USE_MSVCRT. (Ken Takata, closes #4333)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 03 May 2019 22:30:05 +0200 |
parents | 1946487c74ba |
children | f38fcbf343ce |
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 |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 if !has('cmdline_hist') |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 finish |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 endif |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 set history=7 |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 function History_Tests(hist) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 " First clear the history |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 call histadd(a:hist, 'dummy') |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call assert_true(histdel(a:hist)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 call assert_equal(-1, histnr(a:hist)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 call assert_equal('', histget(a:hist)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 call assert_true(histadd(a:hist, 'ls')) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 call assert_true(histadd(a:hist, 'buffers')) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 call assert_equal('buffers', histget(a:hist)) |
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, -2)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 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
|
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('', histget(a:hist, -5)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 call assert_equal(2, histnr(a:hist)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 call assert_true(histdel(a:hist, 2)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 call assert_false(histdel(a:hist, 7)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 call assert_equal(1, histnr(a:hist)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 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
|
28 |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 call assert_true(histadd(a:hist, 'buffers')) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 call assert_true(histadd(a:hist, 'ls')) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 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
|
32 call assert_equal(4, histnr(a:hist)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 |
10434
f3bb76ec4155
commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents:
8406
diff
changeset
|
34 let a=execute('history ' . a:hist) |
f3bb76ec4155
commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents:
8406
diff
changeset
|
35 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
|
36 let a=execute('history all') |
f3bb76ec4155
commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents:
8406
diff
changeset
|
37 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
|
38 |
f3bb76ec4155
commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents:
8406
diff
changeset
|
39 if len(a:hist) > 0 |
f3bb76ec4155
commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents:
8406
diff
changeset
|
40 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
|
41 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
|
42 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
|
43 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
|
44 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
|
45 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
|
46 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
|
47 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
|
48 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
|
49 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
|
50 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
|
51 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
|
52 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
|
53 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
|
54 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
|
55 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
|
56 endif |
f3bb76ec4155
commit https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Christian Brabandt <cb@256bit.org>
parents:
8406
diff
changeset
|
57 |
8406
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 " Test for removing entries matching a pattern |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 for i in range(1, 3) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 call histadd(a:hist, 'text_' . i) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 endfor |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 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
|
63 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
|
64 |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 " Test for freeing the entire history list |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 for i in range(1, 7) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 call histadd(a:hist, 'text_' . i) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 endfor |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 call histdel(a:hist) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 for i in range(1, 7) |
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)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 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
|
73 endfor |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 endfunction |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 function Test_History() |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 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
|
78 call History_Tests(h) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 endfor |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 " Negative tests |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 call assert_false(histdel('abc')) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 call assert_equal('', histget('abc')) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 call assert_fails('call histdel([])', 'E730:') |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 call assert_equal('', histget(10)) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 call assert_fails('call histget([])', 'E730:') |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 call assert_equal(-1, histnr('abc')) |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 call assert_fails('call histnr([])', 'E730:') |
5d926807c19c
commit https://github.com/vim/vim/commit/119d4693e06e68d4f099aa7287e375ae3d265fd0
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 endfunction |
10565
ea0dadb041c9
patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents:
10434
diff
changeset
|
90 |
ea0dadb041c9
patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents:
10434
diff
changeset
|
91 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
|
92 new |
ea0dadb041c9
patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents:
10434
diff
changeset
|
93 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
|
94 1 |
ea0dadb041c9
patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents:
10434
diff
changeset
|
95 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
|
96 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
|
97 1 |
ea0dadb041c9
patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents:
10434
diff
changeset
|
98 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
|
99 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
|
100 1 |
ea0dadb041c9
patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents:
10434
diff
changeset
|
101 " 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
|
102 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
|
103 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
|
104 call assert_equal('a', @/) |
ea0dadb041c9
patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents:
10434
diff
changeset
|
105 bwipe! |
ea0dadb041c9
patch 8.0.0172: command line window does not work
Christian Brabandt <cb@256bit.org>
parents:
10434
diff
changeset
|
106 endfunc |
15097
1946487c74ba
patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
10565
diff
changeset
|
107 |
1946487c74ba
patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
10565
diff
changeset
|
108 function Test_history_completion() |
1946487c74ba
patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
10565
diff
changeset
|
109 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
|
110 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
|
111 endfunc |