annotate src/testdir/test73.in @ 3429:b35844f3eb49 v7.3.480

updated for version 7.3.480 Problem: When using ":qa" and there is a changed buffer picking the buffer to jump to is not very good. Solution: Consider current and other tab pages. (Hirohito Higashi)
author Bram Moolenaar <bram@vim.org>
date Fri, 23 Mar 2012 18:39:18 +0100
parents 1ead15c2ffd0
children 3887b02953ce
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
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
5 :" 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
6 :" 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
7 :"
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
8 :" This will cause a few errors, do it silently.
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
9 :set visualbell
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
10 :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
11 :"
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
12 :function! DeleteDirectory(dir)
2538
3d8a4a148c76 Fixes for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2515
diff changeset
13 : if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
14 : exec "silent !rmdir /Q /S " . a:dir
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
15 : else
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
16 : exec "silent !rm -rf " . a:dir
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
17 : endif
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
18 :endfun
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
19 :" 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
20 :" we start from a clean state.
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
21 :call DeleteDirectory("Xfind")
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
22 :new
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
23 :let cwd=getcwd()
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
24 :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
25 :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
26 :cd Xfind
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
27 :set path=
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
28 :find
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
29 :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
30 :close
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
31 :new
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
32 :set path=.
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
33 :find
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
34 :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
35 :close
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
36 :new
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
37 :set path=.,,
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
38 :find
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
39 :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
40 :close
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
41 :new
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
42 :set path=./**
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
43 :find
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
44 :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
45 :close
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
46 :new
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
47 :" 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
48 :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
49 :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
50 :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
51 :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
52 :e Xfind/file.txt
2489
18c04e8d970e Make test 73 a bit more portable.
Bram Moolenaar <bram@vim.org>
parents: 2487
diff changeset
53 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
54 :e Xfind/in/file.txt
2489
18c04e8d970e Make test 73 a bit more portable.
Bram Moolenaar <bram@vim.org>
parents: 2487
diff changeset
55 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
56 :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
57 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
58 :e Xfind/in/path/file.txt
2489
18c04e8d970e Make test 73 a bit more portable.
Bram Moolenaar <bram@vim.org>
parents: 2487
diff changeset
59 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
60 :set path=Xfind/**
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
62 :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
63 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
64 :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
65 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
66 :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
67 :" 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
68 :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
69 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
70 :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
71 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
72 :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
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 :" 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
76 :" recursive location.
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
77 :" 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
78 :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
79 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
80 :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
81 :find file
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
82 :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
83 :find file
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 :find file
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
86 :" 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
87 :" 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
88 :set path=.
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
89 :find st
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
90 :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
91 :" 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
92 :cd Xfind
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
93 :set path=,,
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
94 :find f
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
95 :exec "w >>" . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
96 :" Test shortening of
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 :" foo/x/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
99 :" foo/y/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
100 :"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
101 :" 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
102 :" of appearance):
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
103 :"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
104 :" x/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
105 :" 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
106 :call mkdir('foo')
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
107 :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
108 :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
109 :call mkdir('y')
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
110 :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
111 :call mkdir('bar')
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
112 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
113 :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
114 :call mkdir('bar')
2542
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
115 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
116 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
117 :" We should now be in the Xfind directory
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
118 :e foo/x/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
119 SVoyager 1:w
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
120 :e foo/y/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
121 SVoyager 2:w
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
122 :exec "set path=" . cwd . "/Xfind/**"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
123 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
124 :exec "w >>" . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
125 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
126 :exec "w >>" . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
127 :"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
128 :" 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
129 :" order of appearance):
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
130 :"
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
131 :" ./voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
132 :" x/bar/voyager.txt
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
133 :cd foo
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
134 :cd y
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
135 :cd bar
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
136 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
137 :exec "w >> " . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
138 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
139 :exec "w >> " . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
140 :" Check the opposite too:
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
141 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
142 :cd ..
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
143 :cd x
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
144 :cd bar
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
145 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
146 :exec "w >> " . test_out
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
147 :find voyager
7a547db7070d Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents: 2538
diff changeset
148 :exec "w >> " . test_out
2549
c210e31a2ec5 More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2542
diff changeset
149 :" 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
150 :exec "cd " . cwd . "/Xfind/in"
c210e31a2ec5 More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2542
diff changeset
151 :find file
c210e31a2ec5 More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2542
diff changeset
152 :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
153 :" 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
154 :exec "cd " . cwd . "/Xfind/"
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
155 :set path=./path
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
156 :" 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
157 :e in/file.txt
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
158 :" 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
159 :find file
1ead15c2ffd0 Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2558
diff changeset
160 :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
161 :q
2549
c210e31a2ec5 More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2542
diff changeset
162 :exec "cd " . cwd
2495
a847363bf06e Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents: 2489
diff changeset
163 :call DeleteDirectory("Xfind")
2487
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
164 :qa!
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
165 ENDTEST
7ec9ada2cd81 Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
166