Mercurial > vim
annotate src/testdir/test73.in @ 9438:7897b1e4f3e7 v7.4.2000
commit https://github.com/vim/vim/commit/245a7cb6d33e556415c9fcaa874b784a6d8f0ef3
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 8 10:53:12 2016 +0200
patch 7.4.2000
Problem: Evalcmd test fails.
Solution: Add missing piece.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 08 Jul 2016 11:00:06 +0200 |
parents | 05e7d084c6c2 |
children | ae45d497868f |
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 :" 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
|
13 :" 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
|
14 :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
|
15 :new |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
16 :let cwd=getcwd() |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
17 :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
|
18 :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
|
19 :cd Xfind |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
20 :set path= |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
21 :find |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
22 :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
|
23 :close |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
24 :new |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
25 :set path=. |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
26 :find |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
27 :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
|
28 :close |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
29 :new |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
30 :set path=.,, |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
31 :find |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
32 :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
|
33 :close |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
34 :new |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
35 :set path=./** |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
36 :find |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
37 :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
|
38 :close |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
39 :new |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
40 :" 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
|
41 :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
|
42 :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
|
43 :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
|
44 :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
|
45 :e Xfind/file.txt |
2489
18c04e8d970e
Make test 73 a bit more portable.
Bram Moolenaar <bram@vim.org>
parents:
2487
diff
changeset
|
46 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
|
47 :e Xfind/in/file.txt |
2489
18c04e8d970e
Make test 73 a bit more portable.
Bram Moolenaar <bram@vim.org>
parents:
2487
diff
changeset
|
48 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
|
49 :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
|
50 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
|
51 :e Xfind/in/path/file.txt |
2489
18c04e8d970e
Make test 73 a bit more portable.
Bram Moolenaar <bram@vim.org>
parents:
2487
diff
changeset
|
52 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
|
53 :set path=Xfind/** |
7ec9ada2cd81
Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
54 :find file |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
55 :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
|
56 :find file |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
57 :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
|
58 :find file |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
59 :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
|
60 :" 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
|
61 :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
|
62 :find file |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
63 :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
|
64 :find file |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
65 :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
|
66 :find file |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
67 :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
|
68 :" 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
|
69 :" recursive location. |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
70 :" 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
|
71 :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
|
72 :find file |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
73 :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
|
74 :find file |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
75 :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
|
76 :find file |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
77 :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
|
78 :find file |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
79 :" 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
|
80 :" 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
|
81 :set path=. |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
82 :find st |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
83 :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
|
84 :" 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
|
85 :cd Xfind |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
86 :set path=,, |
a847363bf06e
Fix a few problems for :find completion. Test much more. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2489
diff
changeset
|
87 :find f |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
88 :exec "w >>" . test_out |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
89 :" Test shortening of |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
90 :" |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
91 :" foo/x/bar/voyager.txt |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
92 :" foo/y/bar/voyager.txt |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
93 :" |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
94 :" 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
|
95 :" of appearance): |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
96 :" |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
97 :" x/bar/voyager.txt |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
98 :" 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
|
99 :call mkdir('foo') |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
100 :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
|
101 :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
|
102 :call mkdir('y') |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
103 :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
|
104 :call mkdir('bar') |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
105 :cd .. |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
106 :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
|
107 :call mkdir('bar') |
2542
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
108 :cd .. |
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 :" We should now be in the Xfind directory |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
111 :e foo/x/bar/voyager.txt |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
112 SVoyager 1:w |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
113 :e foo/y/bar/voyager.txt |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
114 SVoyager 2:w |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
115 :exec "set path=" . cwd . "/Xfind/**" |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
116 :find voyager |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
117 :exec "w >>" . test_out |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
118 :find voyager |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
119 :exec "w >>" . test_out |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
120 :" |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
121 :" 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
|
122 :" order of appearance): |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
123 :" |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
124 :" ./voyager.txt |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
125 :" x/bar/voyager.txt |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
126 :cd foo |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
127 :cd y |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
128 :cd bar |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
129 :find voyager |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
130 :exec "w >> " . test_out |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
131 :find voyager |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
132 :exec "w >> " . test_out |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
133 :" Check the opposite too: |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
134 :cd .. |
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 x |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
137 :cd bar |
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 :find voyager |
7a547db7070d
Improvements for :find completion.
Bram Moolenaar <bram@vim.org>
parents:
2538
diff
changeset
|
141 :exec "w >> " . test_out |
2549
c210e31a2ec5
More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2542
diff
changeset
|
142 :" 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
|
143 :exec "cd " . cwd . "/Xfind/in" |
c210e31a2ec5
More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2542
diff
changeset
|
144 :find file |
c210e31a2ec5
More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2542
diff
changeset
|
145 :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
|
146 :" 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
|
147 :exec "cd " . cwd . "/Xfind/" |
1ead15c2ffd0
Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2558
diff
changeset
|
148 :set path=./path |
1ead15c2ffd0
Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2558
diff
changeset
|
149 :" 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
|
150 :e in/file.txt |
1ead15c2ffd0
Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2558
diff
changeset
|
151 :" 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
|
152 :find file |
1ead15c2ffd0
Two fixes for :find completion and more testing. (Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2558
diff
changeset
|
153 :exec "w >>" . test_out |
4335 | 154 :" |
155 :" Test that completion works when path=.,, | |
156 :" | |
157 :set path=.,, | |
158 :" Open Jimmy Hoffa file | |
159 :e in/file.txt | |
160 :exec "w >>" . test_out | |
161 :" Search for the file containing Holy Grail in same directory as in/path.txt | |
162 :find stu | |
163 :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
|
164 :q |
2549
c210e31a2ec5
More fixes for :find completion. (mostly by Nazri Ramliy)
Bram Moolenaar <bram@vim.org>
parents:
2542
diff
changeset
|
165 :exec "cd " . cwd |
9254
05e7d084c6c2
commit https://github.com/vim/vim/commit/abc70bbf363dbbe3f2bf714102f55648a512791e
Christian Brabandt <cb@256bit.org>
parents:
4335
diff
changeset
|
166 :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
|
167 :qa! |
7ec9ada2cd81
Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
168 ENDTEST |
7ec9ada2cd81
Make :find completion consistent between Unix and MS-Windows. Add a test.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
169 |