1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1063
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.1063
Problem: Insufficient testing for wildmenu completion.
Solution: Extend the test case. (Dominique Pelle, closes #4182)
Files: src/testdir/test_cmdline.vim
*** ../vim-8.1.1062/src/testdir/test_cmdline.vim 2019-01-27 20:43:38.131329221 +0100
--- src/testdir/test_cmdline.vim 2019-03-28 21:25:45.568869400 +0100
***************
*** 14,27 ****
endfunc
func Test_complete_wildmenu()
! call writefile(['testfile1'], 'Xtestfile1')
! call writefile(['testfile2'], 'Xtestfile2')
set wildmenu
! call feedkeys(":e Xtest\t\t\r", "tx")
call assert_equal('testfile2', getline(1))
! call delete('Xtestfile1')
! call delete('Xtestfile2')
set nowildmenu
endfunc
--- 14,61 ----
endfunc
func Test_complete_wildmenu()
! call mkdir('Xdir1/Xdir2', 'p')
! call writefile(['testfile1'], 'Xdir1/Xtestfile1')
! call writefile(['testfile2'], 'Xdir1/Xtestfile2')
! call writefile(['testfile3'], 'Xdir1/Xdir2/Xtestfile3')
! call writefile(['testfile3'], 'Xdir1/Xdir2/Xtestfile4')
set wildmenu
!
! " Pressing <Tab> completes, and moves to next files when pressing again.
! call feedkeys(":e Xdir1/\<Tab>\<Tab>\<CR>", 'tx')
! call assert_equal('testfile1', getline(1))
! call feedkeys(":e Xdir1/\<Tab>\<Tab>\<Tab>\<CR>", 'tx')
! call assert_equal('testfile2', getline(1))
!
! " <S-Tab> is like <Tab> but begin with the last match and then go to
! " previous.
! call feedkeys(":e Xdir1/Xtest\<S-Tab>\<CR>", 'tx')
call assert_equal('testfile2', getline(1))
+ call feedkeys(":e Xdir1/Xtest\<S-Tab>\<S-Tab>\<CR>", 'tx')
+ call assert_equal('testfile1', getline(1))
+
+ " <Left>/<Right> to move to previous/next file.
+ call feedkeys(":e Xdir1/\<Tab>\<Right>\<CR>", 'tx')
+ call assert_equal('testfile1', getline(1))
+ call feedkeys(":e Xdir1/\<Tab>\<Right>\<Right>\<CR>", 'tx')
+ call assert_equal('testfile2', getline(1))
+ call feedkeys(":e Xdir1/\<Tab>\<Right>\<Right>\<Left>\<CR>", 'tx')
+ call assert_equal('testfile1', getline(1))
+
+ " <Up>/<Down> to go up/down directories.
+ call feedkeys(":e Xdir1/\<Tab>\<Down>\<CR>", 'tx')
+ call assert_equal('testfile3', getline(1))
+ call feedkeys(":e Xdir1/\<Tab>\<Down>\<Up>\<Right>\<CR>", 'tx')
+ call assert_equal('testfile1', getline(1))
! " cleanup
! %bwipe
! call delete('Xdir1/Xdir2/Xtestfile4')
! call delete('Xdir1/Xdir2/Xtestfile3')
! call delete('Xdir1/Xtestfile2')
! call delete('Xdir1/Xtestfile1')
! call delete('Xdir1/Xdir2', 'd')
! call delete('Xdir1', 'd')
set nowildmenu
endfunc
*** ../vim-8.1.1062/src/version.c 2019-03-28 20:31:03.416924480 +0100
--- src/version.c 2019-03-28 21:24:31.133423039 +0100
***************
*** 777,778 ****
--- 777,780 ----
{ /* Add new patch number below this line */
+ /**/
+ 1063,
/**/
--
hundred-and-one symptoms of being an internet addict:
138. You develop a liking for cold coffee.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|