annotate src/testdir/test_find_complete.vim @ 12851:90aaa974594e v8.0.1302

patch 8.0.1302: still too many old style tests commit https://github.com/vim/vim/commit/209d3874c19d73b209e7d223cf05ea22e183f408 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 16 21:52:51 2017 +0100 patch 8.0.1302: still too many old style tests Problem: Still too many old style tests. Solution: Convert a few more tests to new style. (Yegappan Lakshmanan, closes #2326)
author Christian Brabandt <cb@256bit.org>
date Thu, 16 Nov 2017 22:00:03 +0100
parents
children 0dfd846f9190
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12851
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Tests for the 'find' command completion.
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Do all the tests in a separate window to avoid E211 when we recursively
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " delete the Xfind directory during cleanup
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 func Test_find_complete()
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 set belloff=all
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 " On windows a stale "Xfind" directory may exist, remove it so that
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 " we start from a clean state.
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 call delete("Xfind", "rf")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 let cwd = getcwd()
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 let test_out = cwd . '/test.out'
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 call mkdir('Xfind')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 cd Xfind
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 new
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 set path=
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 call assert_fails('call feedkeys(":find\t\n", "xt")', 'E345:')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 close
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 new
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 set path=.
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 call assert_fails('call feedkeys(":find\t\n", "xt")', 'E32:')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 close
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 new
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 set path=.,,
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 call assert_fails('call feedkeys(":find\t\n", "xt")', 'E32:')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 close
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 new
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 set path=./**
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 call assert_fails('call feedkeys(":find\t\n", "xt")', 'E32:')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 close
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 " We shouldn't find any file till this point
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 call mkdir('in/path', 'p')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 exe 'cd ' . cwd
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 call writefile(['Holy Grail'], 'Xfind/file.txt')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 call writefile(['Jimmy Hoffa'], 'Xfind/in/file.txt')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 call writefile(['Another Holy Grail'], 'Xfind/in/stuff.txt')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 call writefile(['E.T.'], 'Xfind/in/path/file.txt')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 new
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 set path=Xfind/**
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 call feedkeys(":find file\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 call assert_equal('Holy Grail', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 call feedkeys(":find file\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 call assert_equal('Jimmy Hoffa', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 call feedkeys(":find file\t\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 call assert_equal('E.T.', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 " Rerun the previous three find completions, using fullpath in 'path'
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 exec "set path=" . cwd . "/Xfind/**"
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 call feedkeys(":find file\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 call assert_equal('Holy Grail', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 call feedkeys(":find file\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 call assert_equal('Jimmy Hoffa', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 call feedkeys(":find file\t\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 call assert_equal('E.T.', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 " Same steps again, using relative and fullpath items that point to the same
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 " recursive location.
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 " This is to test that there are no duplicates in the completion list.
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 set path+=Xfind/**
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 call feedkeys(":find file\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 call assert_equal('Holy Grail', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 call feedkeys(":find file\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 call assert_equal('Jimmy Hoffa', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 call feedkeys(":find file\t\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 call assert_equal('E.T.', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 call feedkeys(":find file\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 " Test find completion for directory of current buffer, which at this point
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77 " is Xfind/in/file.txt.
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 set path=.
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79 call feedkeys(":find st\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 call assert_equal('Another Holy Grail', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 " Test find completion for empty path item ",," which is the current
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 " directory
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 cd Xfind
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 set path=,,
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 call feedkeys(":find f\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87 call assert_equal('Holy Grail', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 " Test shortening of
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 "
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 " foo/x/bar/voyager.txt
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92 " foo/y/bar/voyager.txt
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 "
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 " When current directory is above foo/ they should be shortened to (in order
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95 " of appearance):
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
96 "
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
97 " x/bar/voyager.txt
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 " y/bar/voyager.txt
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
99 call mkdir('foo/x/bar', 'p')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
100 call mkdir('foo/y/bar', 'p')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
101 call writefile(['Voyager 1'], 'foo/x/bar/voyager.txt')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
102 call writefile(['Voyager 2'], 'foo/y/bar/voyager.txt')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
103
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
104 exec "set path=" . cwd . "/Xfind/**"
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
105 call feedkeys(":find voyager\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
106 call assert_equal('Voyager 1', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
107 call feedkeys(":find voyager\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
108 call assert_equal('Voyager 2', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
109
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
110 "
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
111 " When current directory is .../foo/y/bar they should be shortened to (in
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
112 " order of appearance):
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
113 "
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
114 " ./voyager.txt
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
115 " x/bar/voyager.txt
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
116 cd foo/y/bar
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
117 call feedkeys(":find voyager\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
118 call assert_equal('Voyager 2', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
119 call feedkeys(":find voyager\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
120 call assert_equal('Voyager 1', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
121
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
122 " Check the opposite too:
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
123 cd ../../x/bar
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
124 call feedkeys(":find voyager\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
125 call assert_equal('Voyager 1', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
126 call feedkeys(":find voyager\t\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
127 call assert_equal('Voyager 2', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
128
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
129 " Check for correct handling of shorten_fname()'s behavior on windows
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
130 exec "cd " . cwd . "/Xfind/in"
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
131 call feedkeys(":find file\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
132 call assert_equal('Jimmy Hoffa', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
133
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
134 " Test for relative to current buffer 'path' item
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
135 exec "cd " . cwd . "/Xfind/"
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
136 set path=./path
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
137 " Open the file where Jimmy Hoffa is found
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
138 e in/file.txt
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
139 " Find the file containing 'E.T.' in the Xfind/in/path directory
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
140 call feedkeys(":find file\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
141 call assert_equal('E.T.', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
142
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
143 " Test that completion works when path=.,,
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
144 set path=.,,
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
145 " Open Jimmy Hoffa file
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
146 e in/file.txt
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
147 call assert_equal('Jimmy Hoffa', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
148
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
149 " Search for the file containing Holy Grail in same directory as in/path.txt
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
150 call feedkeys(":find stu\t\n", "xt")
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
151 call assert_equal('Another Holy Grail', getline(1))
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
152
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
153 enew | only
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
154 exe 'cd ' . cwd
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
155 call delete('Xfind', 'rf')
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
156 set path&
90aaa974594e patch 8.0.1302: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
157 endfunc