annotate src/testdir/test73.in @ 11091:ae45d497868f v8.0.0433

patch 8.0.0433: beeps when running tests commit https://github.com/vim/vim/commit/c3c766ea8c35f5b2bd45fb3d74d0ae46b2d8c24f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 8 22:55:19 2017 +0100 patch 8.0.0433: beeps when running tests Problem: Quite a few beeps when running tests. Solution: Set 'belloff' for these tests. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Wed, 08 Mar 2017 23:00:06 +0100
parents 05e7d084c6c2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2487
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Tests for find completion.
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
2514
f60d1b74b271 Fix: test 73 failed with small features.
Bram Moolenaar <bram@vim.org>
parents: 2495
diff changeset
4 :so small.vim
11091
ae45d497868f patch 8.0.0433: beeps when running tests
Christian Brabandt <cb@256bit.org>
parents: 9254
diff changeset
5 :set belloff=all
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
6 :" Do all test in a separate window to avoid E211 when we recursively
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
7 :" delete the Xfind directory during cleanup
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
8 :"
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
9 :" This will cause a few errors, do it silently.
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
10 :set visualbell
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
11 :set nocp viminfo+=nviminfo
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
12 :"
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
13 :" On windows a stale "Xfind" directory may exist, remove it so that
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
14 :" we start from a clean state.
9254
05e7d084c6c2 commit https://github.com/vim/vim/commit/abc70bbf363dbbe3f2bf714102f55648a512791e
Christian Brabandt <cb@256bit.org>
parents: 4335
diff changeset
15 :call delete("Xfind", "rf")
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
16 :new
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
17 :let cwd=getcwd()
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
18 :let test_out = cwd . '/test.out'
2558
3908363237a9 Use mkdir() instead of !mkdir in test 73, it's more reliable.
Bram Moolenaar <bram@vim.org>
parents: 2549
diff changeset
19 :call mkdir('Xfind')
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
20 :cd Xfind
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
21 :set path=
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
22 :find
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
23 :exec "w! " . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
24 :close
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
25 :new
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
26 :set path=.
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
27 :find
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
28 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
29 :close
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
30 :new
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
31 :set path=.,,
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
32 :find
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
33 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
34 :close
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
35 :new
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
36 :set path=./**
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
37 :find
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
38 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
39 :close
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
40 :new
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
41 :" We shouldn't find any file at this point, test.out must be empty.
2558
3908363237a9 Use mkdir() instead of !mkdir in test 73, it's more reliable.
Bram Moolenaar <bram@vim.org>
parents: 2549
diff changeset
42 :call mkdir('in')
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
43 :cd in
2558
3908363237a9 Use mkdir() instead of !mkdir in test 73, it's more reliable.
Bram Moolenaar <bram@vim.org>
parents: 2549
diff changeset
44 :call mkdir('path')
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
45 :exec "cd " . cwd
2487
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 :e Xfind/file.txt
2489
18c04e8d970e Make test 73 a bit more portable.
Bram Moolenaar <bram@vim.org>
parents: 2487
diff changeset
47 SHoly Grail:w
2487
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 :e Xfind/in/file.txt
2489
18c04e8d970e Make test 73 a bit more portable.
Bram Moolenaar <bram@vim.org>
parents: 2487
diff changeset
49 SJimmy Hoffa:w
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
50 :e Xfind/in/stuff.txt
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
51 SAnother Holy Grail:w
2487
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 :e Xfind/in/path/file.txt
2489
18c04e8d970e Make test 73 a bit more portable.
Bram Moolenaar <bram@vim.org>
parents: 2487
diff changeset
53 SE.T.:w
2487
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 :set path=Xfind/**
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
56 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
57 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
58 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
59 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
60 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
61 :" Rerun the previous three find completions, using fullpath in 'path'
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
62 :exec "set path=" . cwd . "/Xfind/**"
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
63 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
64 :exec "w >>" . test_out
2487
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
66 :exec "w >>" . test_out
2487
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
68 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
69 :" Same steps again, using relative and fullpath items that point to the same
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
70 :" recursive location.
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
71 :" This is to test that there are no duplicates in the completion list.
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
72 :exec "set path+=Xfind/**"
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
73 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
74 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
75 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
76 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
77 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
78 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
79 :find file
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
80 :" Test find completion for directory of current buffer, which at this point
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
81 :" is Xfind/in/file.txt.
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
82 :set path=.
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
83 :find st
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
84 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
85 :" Test find completion for empty path item ",," which is the current directory
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
86 :cd Xfind
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
87 :set path=,,
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
88 :find f
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
89 :exec "w >>" . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
90 :" Test shortening of
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
91 :"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
92 :" foo/x/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
93 :" foo/y/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
94 :"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
95 :" When current directory is above foo/ they should be shortened to (in order
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
96 :" of appearance):
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
97 :"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
98 :" x/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
99 :" y/bar/voyager.txt
2558
3908363237a9 Use mkdir() instead of !mkdir in test 73, it's more reliable.
Bram Moolenaar <bram@vim.org>
parents: 2549
diff changeset
100 :call mkdir('foo')
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
101 :cd foo
2558
3908363237a9 Use mkdir() instead of !mkdir in test 73, it's more reliable.
Bram Moolenaar <bram@vim.org>
parents: 2549
diff changeset
102 :call mkdir('x')
3908363237a9 Use mkdir() instead of !mkdir in test 73, it's more reliable.
Bram Moolenaar <bram@vim.org>
parents: 2549
diff changeset
103 :call mkdir('y')
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
104 :cd x
2558
3908363237a9 Use mkdir() instead of !mkdir in test 73, it's more reliable.
Bram Moolenaar <bram@vim.org>
parents: 2549
diff changeset
105 :call mkdir('bar')
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
106 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
107 :cd y
2558
3908363237a9 Use mkdir() instead of !mkdir in test 73, it's more reliable.
Bram Moolenaar <bram@vim.org>
parents: 2549
diff changeset
108 :call mkdir('bar')
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
109 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
110 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
111 :" We should now be in the Xfind directory
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
112 :e foo/x/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
113 SVoyager 1:w
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
114 :e foo/y/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
115 SVoyager 2:w
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
116 :exec "set path=" . cwd . "/Xfind/**"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
117 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
118 :exec "w >>" . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
119 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
120 :exec "w >>" . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
121 :"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
122 :" When current directory is .../foo/y/bar they should be shortened to (in
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
123 :" order of appearance):
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
124 :"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
125 :" ./voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
126 :" x/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
127 :cd foo
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
128 :cd y
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
129 :cd bar
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
130 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
131 :exec "w >> " . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
132 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
133 :exec "w >> " . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
134 :" Check the opposite too:
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
135 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
136 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
137 :cd x
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
138 :cd bar
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
139 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
140 :exec "w >> " . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
141 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
142 :exec "w >> " . test_out
2549
c210e31a2ec5 More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2542
diff changeset
143 :" Check for correct handling of shorten_fname()'s behavior on windows
c210e31a2ec5 More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2542
diff changeset
144 :exec "cd " . cwd . "/Xfind/in"
c210e31a2ec5 More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2542
diff changeset
145 :find file
c210e31a2ec5 More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2542
diff changeset
146 :exec "w >>" . test_out
2568
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
147 :" Test for relative to current buffer 'path' item
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
148 :exec "cd " . cwd . "/Xfind/"
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
149 :set path=./path
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
150 :" Open the file where Jimmy Hoffa is found
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
151 :e in/file.txt
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
152 :" Find the file containing 'E.T.' in the Xfind/in/path directory
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
153 :find file
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
154 :exec "w >>" . test_out
4335
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
155 :"
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
156 :" Test that completion works when path=.,,
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
157 :"
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
158 :set path=.,,
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
159 :" Open Jimmy Hoffa file
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
160 :e in/file.txt
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
161 :exec "w >>" . test_out
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
162 :" Search for the file containing Holy Grail in same directory as in/path.txt
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
163 :find stu
3887b02953ce updated for version 7.3.917
Bram Moolenaar <bram@vim.org>
parents: 2568
diff changeset
164 :exec "w >>" . test_out
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
165 :q
2549
c210e31a2ec5 More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2542
diff changeset
166 :exec "cd " . cwd
9254
05e7d084c6c2 commit https://github.com/vim/vim/commit/abc70bbf363dbbe3f2bf714102f55648a512791e
Christian Brabandt <cb@256bit.org>
parents: 4335
diff changeset
167 :call delete("Xfind", "rf")
2487
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
168 :qa!
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
169 ENDTEST
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
170