Mercurial > vim
annotate src/testdir/test_packadd.vim @ 32051:e8c60d35fce3 v9.0.1357
patch 9.0.1357: using null_object results in an internal error
Commit: https://github.com/vim/vim/commit/c4e1b86cb0d88fa5ec1141d3c600e026dcc1bc21
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 26 18:58:23 2023 +0000
patch 9.0.1357: using null_object results in an internal error
Problem: Using null_object results in an internal error. (Ernie Rael)
Solution: Add instructions for pushing an object and class. (closes https://github.com/vim/vim/issues/12044)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 26 Feb 2023 20:00:03 +0100 |
parents | aec031683d61 |
children | 5372bf23bf72 |
rev | line source |
---|---|
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for 'packpath' and :packadd |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19231
diff
changeset
|
3 source check.vim |
11091
ae45d497868f
patch 8.0.0433: beeps when running tests
Christian Brabandt <cb@256bit.org>
parents:
10873
diff
changeset
|
4 |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 func SetUp() |
29970
d891115c0aea
patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents:
27495
diff
changeset
|
6 let s:topdir = getcwd() . '/Xppdir' |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 exe 'set packpath=' . s:topdir |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 let s:plugdir = s:topdir . '/pack/mine/opt/mytest' |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 endfunc |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 func TearDown() |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call delete(s:topdir, 'rf') |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 endfunc |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 func Test_packadd() |
14681
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
16 if !exists('s:plugdir') |
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
17 echomsg 'when running this test manually, call SetUp() first' |
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
18 return |
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
19 endif |
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
20 |
8823
6d92bbe6c7de
commit https://github.com/vim/vim/commit/71fb0c146bef08dc276fc5793bd47366e6e0f32a
Christian Brabandt <cb@256bit.org>
parents:
8528
diff
changeset
|
21 call mkdir(s:plugdir . '/plugin/also', 'p') |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 call mkdir(s:plugdir . '/ftdetect', 'p') |
9112
932f94b2d8c2
commit https://github.com/vim/vim/commit/a57024453115592b8847af40ddd965a33898e390
Christian Brabandt <cb@256bit.org>
parents:
8849
diff
changeset
|
23 call mkdir(s:plugdir . '/after', 'p') |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 set rtp& |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 let rtp = &rtp |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 filetype on |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 |
14681
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
28 let rtp_entries = split(rtp, ',') |
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
29 for entry in rtp_entries |
31819
aec031683d61
patch 9.0.1242: code for :runtime completion is not consistent
Bram Moolenaar <Bram@vim.org>
parents:
31811
diff
changeset
|
30 if entry =~? '\<after\>' |
14681
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
31 let first_after_entry = entry |
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
32 break |
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
33 endif |
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
34 endfor |
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
35 |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 exe 'split ' . s:plugdir . '/plugin/test.vim' |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 call setline(1, 'let g:plugin_works = 42') |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 wq |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 |
8823
6d92bbe6c7de
commit https://github.com/vim/vim/commit/71fb0c146bef08dc276fc5793bd47366e6e0f32a
Christian Brabandt <cb@256bit.org>
parents:
8528
diff
changeset
|
40 exe 'split ' . s:plugdir . '/plugin/also/loaded.vim' |
6d92bbe6c7de
commit https://github.com/vim/vim/commit/71fb0c146bef08dc276fc5793bd47366e6e0f32a
Christian Brabandt <cb@256bit.org>
parents:
8528
diff
changeset
|
41 call setline(1, 'let g:plugin_also_works = 77') |
6d92bbe6c7de
commit https://github.com/vim/vim/commit/71fb0c146bef08dc276fc5793bd47366e6e0f32a
Christian Brabandt <cb@256bit.org>
parents:
8528
diff
changeset
|
42 wq |
6d92bbe6c7de
commit https://github.com/vim/vim/commit/71fb0c146bef08dc276fc5793bd47366e6e0f32a
Christian Brabandt <cb@256bit.org>
parents:
8528
diff
changeset
|
43 |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 exe 'split ' . s:plugdir . '/ftdetect/test.vim' |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 call setline(1, 'let g:ftdetect_works = 17') |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 wq |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 packadd mytest |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 call assert_equal(42, g:plugin_works) |
8823
6d92bbe6c7de
commit https://github.com/vim/vim/commit/71fb0c146bef08dc276fc5793bd47366e6e0f32a
Christian Brabandt <cb@256bit.org>
parents:
8528
diff
changeset
|
51 call assert_equal(77, g:plugin_also_works) |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 call assert_equal(17, g:ftdetect_works) |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 call assert_true(len(&rtp) > len(rtp)) |
29970
d891115c0aea
patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents:
27495
diff
changeset
|
54 call assert_match('/testdir/Xppdir/pack/mine/opt/mytest\($\|,\)', &rtp) |
14681
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
55 |
29970
d891115c0aea
patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents:
27495
diff
changeset
|
56 let new_after = match(&rtp, '/testdir/Xppdir/pack/mine/opt/mytest/after,') |
14683
c833cf17a4b1
patch 8.1.0354: packadd test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
14681
diff
changeset
|
57 let forwarded = substitute(first_after_entry, '\\', '[/\\\\]', 'g') |
c833cf17a4b1
patch 8.1.0354: packadd test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
14681
diff
changeset
|
58 let old_after = match(&rtp, ',' . forwarded . '\>') |
14681
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
59 call assert_true(new_after > 0, 'rtp is ' . &rtp) |
14683
c833cf17a4b1
patch 8.1.0354: packadd test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
14681
diff
changeset
|
60 call assert_true(old_after > 0, 'match ' . forwarded . ' in ' . &rtp) |
14681
285b051979a6
patch 8.1.0353: an "after" directory of a package is appended to 'rtp'
Christian Brabandt <cb@256bit.org>
parents:
13724
diff
changeset
|
61 call assert_true(new_after < old_after, 'rtp is ' . &rtp) |
8416
1a6527cce675
commit https://github.com/vim/vim/commit/be82c254862e475a582c0717455e1db6bf96b0d0
Christian Brabandt <cb@256bit.org>
parents:
8402
diff
changeset
|
62 |
13724
5ef1e6170589
patch 8.0.1734: package directory not added to 'rtp' if prefix matches
Christian Brabandt <cb@256bit.org>
parents:
13190
diff
changeset
|
63 " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest' |
5ef1e6170589
patch 8.0.1734: package directory not added to 'rtp' if prefix matches
Christian Brabandt <cb@256bit.org>
parents:
13190
diff
changeset
|
64 call mkdir(fnamemodify(s:plugdir, ':h') . '/myte', 'p') |
5ef1e6170589
patch 8.0.1734: package directory not added to 'rtp' if prefix matches
Christian Brabandt <cb@256bit.org>
parents:
13190
diff
changeset
|
65 let rtp = &rtp |
5ef1e6170589
patch 8.0.1734: package directory not added to 'rtp' if prefix matches
Christian Brabandt <cb@256bit.org>
parents:
13190
diff
changeset
|
66 packadd myte |
5ef1e6170589
patch 8.0.1734: package directory not added to 'rtp' if prefix matches
Christian Brabandt <cb@256bit.org>
parents:
13190
diff
changeset
|
67 |
5ef1e6170589
patch 8.0.1734: package directory not added to 'rtp' if prefix matches
Christian Brabandt <cb@256bit.org>
parents:
13190
diff
changeset
|
68 " Check the path of 'myte' is added |
5ef1e6170589
patch 8.0.1734: package directory not added to 'rtp' if prefix matches
Christian Brabandt <cb@256bit.org>
parents:
13190
diff
changeset
|
69 call assert_true(len(&rtp) > len(rtp)) |
29970
d891115c0aea
patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents:
27495
diff
changeset
|
70 call assert_match('/testdir/Xppdir/pack/mine/opt/myte\($\|,\)', &rtp) |
13724
5ef1e6170589
patch 8.0.1734: package directory not added to 'rtp' if prefix matches
Christian Brabandt <cb@256bit.org>
parents:
13190
diff
changeset
|
71 |
8416
1a6527cce675
commit https://github.com/vim/vim/commit/be82c254862e475a582c0717455e1db6bf96b0d0
Christian Brabandt <cb@256bit.org>
parents:
8402
diff
changeset
|
72 " Check exception |
1a6527cce675
commit https://github.com/vim/vim/commit/be82c254862e475a582c0717455e1db6bf96b0d0
Christian Brabandt <cb@256bit.org>
parents:
8402
diff
changeset
|
73 call assert_fails("packadd directorynotfound", 'E919:') |
1a6527cce675
commit https://github.com/vim/vim/commit/be82c254862e475a582c0717455e1db6bf96b0d0
Christian Brabandt <cb@256bit.org>
parents:
8402
diff
changeset
|
74 call assert_fails("packadd", 'E471:') |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 endfunc |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 |
13045
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
77 func Test_packadd_start() |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
78 let plugdir = s:topdir . '/pack/mine/start/other' |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
79 call mkdir(plugdir . '/plugin', 'p') |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
80 set rtp& |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
81 let rtp = &rtp |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
82 filetype on |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
83 |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
84 exe 'split ' . plugdir . '/plugin/test.vim' |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
85 call setline(1, 'let g:plugin_works = 24') |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
86 wq |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
87 |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
88 packadd other |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
89 |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
90 call assert_equal(24, g:plugin_works) |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
91 call assert_true(len(&rtp) > len(rtp)) |
29970
d891115c0aea
patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents:
27495
diff
changeset
|
92 call assert_match('/testdir/Xppdir/pack/mine/start/other\($\|,\)', &rtp) |
13045
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
93 endfunc |
afd60028f7b7
patch 8.0.1398: :packadd does not load packages from the "start" directory
Christian Brabandt <cb@256bit.org>
parents:
12692
diff
changeset
|
94 |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 func Test_packadd_noload() |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 call mkdir(s:plugdir . '/plugin', 'p') |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 call mkdir(s:plugdir . '/syntax', 'p') |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 set rtp& |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 let rtp = &rtp |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 exe 'split ' . s:plugdir . '/plugin/test.vim' |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 call setline(1, 'let g:plugin_works = 42') |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 wq |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 let g:plugin_works = 0 |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 packadd! mytest |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
107 |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 call assert_true(len(&rtp) > len(rtp)) |
29970
d891115c0aea
patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents:
27495
diff
changeset
|
109 call assert_match('testdir/Xppdir/pack/mine/opt/mytest\($\|,\)', &rtp) |
8388
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 call assert_equal(0, g:plugin_works) |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 " check the path is not added twice |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 let new_rtp = &rtp |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 packadd! mytest |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 call assert_equal(new_rtp, &rtp) |
f5972de59001
commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 endfunc |
8402
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
117 |
10837
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
118 func Test_packadd_symlink_dir() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19231
diff
changeset
|
119 CheckUnix |
10837
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
120 let top2_dir = s:topdir . '/Xdir2' |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
121 let real_dir = s:topdir . '/Xsym' |
11099
613d9bcd7a52
patch 8.0.0437: packadd test does not fully work
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
122 call mkdir(real_dir, 'p') |
613d9bcd7a52
patch 8.0.0437: packadd test does not fully work
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
123 exec "silent !ln -s Xsym" top2_dir |
10837
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
124 let &rtp = top2_dir . ',' . top2_dir . '/after' |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
125 let &packpath = &rtp |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
126 |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
127 let s:plugdir = top2_dir . '/pack/mine/opt/mytest' |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
128 call mkdir(s:plugdir . '/plugin', 'p') |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
129 |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
130 exe 'split ' . s:plugdir . '/plugin/test.vim' |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
131 call setline(1, 'let g:plugin_works = 44') |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
132 wq |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
133 let g:plugin_works = 0 |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
134 |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
135 packadd mytest |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
136 |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
137 " Must have been inserted in the middle, not at the end |
13190
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
138 call assert_match('/pack/mine/opt/mytest,', &rtp) |
10837
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
139 call assert_equal(44, g:plugin_works) |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
140 |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
141 " No change when doing it again. |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
142 let rtp_before = &rtp |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
143 packadd mytest |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
144 call assert_equal(rtp_before, &rtp) |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
145 |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
146 set rtp& |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
147 let rtp = &rtp |
10873
fba4d2f22425
patch 8.0.0326: packadd test uses wrong directory name
Christian Brabandt <cb@256bit.org>
parents:
10871
diff
changeset
|
148 exec "silent !rm" top2_dir |
10837
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
149 endfunc |
437cf0fe2138
patch 8.0.0308: 'runtimepath' not update correctly when using symbolic link
Christian Brabandt <cb@256bit.org>
parents:
9112
diff
changeset
|
150 |
13190
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
151 func Test_packadd_symlink_dir2() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19231
diff
changeset
|
152 CheckUnix |
13190
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
153 let top2_dir = s:topdir . '/Xdir2' |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
154 let real_dir = s:topdir . '/Xsym/pack' |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
155 call mkdir(top2_dir, 'p') |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
156 call mkdir(real_dir, 'p') |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
157 let &rtp = top2_dir . ',' . top2_dir . '/after' |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
158 let &packpath = &rtp |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
159 |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
160 exec "silent !ln -s ../Xsym/pack" top2_dir . '/pack' |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
161 let s:plugdir = top2_dir . '/pack/mine/opt/mytest' |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
162 call mkdir(s:plugdir . '/plugin', 'p') |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
163 |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
164 exe 'split ' . s:plugdir . '/plugin/test.vim' |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
165 call setline(1, 'let g:plugin_works = 48') |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
166 wq |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
167 let g:plugin_works = 0 |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
168 |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
169 packadd mytest |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
170 |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
171 " Must have been inserted in the middle, not at the end |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
172 call assert_match('/Xdir2/pack/mine/opt/mytest,', &rtp) |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
173 call assert_equal(48, g:plugin_works) |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
174 |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
175 " No change when doing it again. |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
176 let rtp_before = &rtp |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
177 packadd mytest |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
178 call assert_equal(rtp_before, &rtp) |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
179 |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
180 set rtp& |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
181 let rtp = &rtp |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
182 exec "silent !rm" top2_dir . '/pack' |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
183 exec "silent !rmdir" top2_dir |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
184 endfunc |
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
185 |
31819
aec031683d61
patch 9.0.1242: code for :runtime completion is not consistent
Bram Moolenaar <Bram@vim.org>
parents:
31811
diff
changeset
|
186 " Check command-line completion for :packadd |
8402
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
187 func Test_packadd_completion() |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
188 let optdir1 = &packpath . '/pack/mine/opt' |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
189 let optdir2 = &packpath . '/pack/candidate/opt' |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
190 |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
191 call mkdir(optdir1 . '/pluginA', 'p') |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
192 call mkdir(optdir1 . '/pluginC', 'p') |
31798
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
193 call writefile([], optdir1 . '/unrelated') |
8402
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
194 call mkdir(optdir2 . '/pluginB', 'p') |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
195 call mkdir(optdir2 . '/pluginC', 'p') |
31798
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
196 call writefile([], optdir2 . '/unrelated') |
8402
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
197 |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
198 let li = [] |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
199 call feedkeys(":packadd \<Tab>')\<C-B>call add(li, '\<CR>", 't') |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
200 call feedkeys(":packadd " . repeat("\<Tab>", 2) . "')\<C-B>call add(li, '\<CR>", 't') |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
201 call feedkeys(":packadd " . repeat("\<Tab>", 3) . "')\<C-B>call add(li, '\<CR>", 't') |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
202 call feedkeys(":packadd " . repeat("\<Tab>", 4) . "')\<C-B>call add(li, '\<CR>", 'tx') |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
203 call assert_equal("packadd pluginA", li[0]) |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
204 call assert_equal("packadd pluginB", li[1]) |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
205 call assert_equal("packadd pluginC", li[2]) |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
206 call assert_equal("packadd ", li[3]) |
eed1ca42f9aa
commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents:
8388
diff
changeset
|
207 endfunc |
8520
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
208 |
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
209 func Test_packloadall() |
8849
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
210 " plugin foo with an autoload directory |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
211 let fooplugindir = &packpath . '/pack/mine/start/foo/plugin' |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
212 call mkdir(fooplugindir, 'p') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
213 call writefile(['let g:plugin_foo_number = 1234', |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
214 \ 'let g:plugin_foo_auto = bbb#value', |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
215 \ 'let g:plugin_extra_auto = extra#value'], fooplugindir . '/bar.vim') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
216 let fooautodir = &packpath . '/pack/mine/start/foo/autoload' |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
217 call mkdir(fooautodir, 'p') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
218 call writefile(['let bar#value = 77'], fooautodir . '/bar.vim') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
219 |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
220 " plugin aaa with an autoload directory |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
221 let aaaplugindir = &packpath . '/pack/mine/start/aaa/plugin' |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
222 call mkdir(aaaplugindir, 'p') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
223 call writefile(['let g:plugin_aaa_number = 333', |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
224 \ 'let g:plugin_aaa_auto = bar#value'], aaaplugindir . '/bbb.vim') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
225 let aaaautodir = &packpath . '/pack/mine/start/aaa/autoload' |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
226 call mkdir(aaaautodir, 'p') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
227 call writefile(['let bbb#value = 55'], aaaautodir . '/bbb.vim') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
228 |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
229 " plugin extra with only an autoload directory |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
230 let extraautodir = &packpath . '/pack/mine/start/extra/autoload' |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
231 call mkdir(extraautodir, 'p') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
232 call writefile(['let extra#value = 99'], extraautodir . '/extra.vim') |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
233 |
8520
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
234 packloadall |
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
235 call assert_equal(1234, g:plugin_foo_number) |
8849
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
236 call assert_equal(55, g:plugin_foo_auto) |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
237 call assert_equal(99, g:plugin_extra_auto) |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
238 call assert_equal(333, g:plugin_aaa_number) |
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
239 call assert_equal(77, g:plugin_aaa_auto) |
8520
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
240 |
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
241 " only works once |
8849
9f40a379ff1e
commit https://github.com/vim/vim/commit/49b27326447d0827c59c6cd201d58f65c1163086
Christian Brabandt <cb@256bit.org>
parents:
8823
diff
changeset
|
242 call writefile(['let g:plugin_bar_number = 4321'], fooplugindir . '/bar2.vim') |
8520
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
243 packloadall |
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
244 call assert_false(exists('g:plugin_bar_number')) |
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
245 |
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
246 " works when ! used |
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
247 packloadall! |
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
248 call assert_equal(4321, g:plugin_bar_number) |
b4350a4d1e01
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents:
8416
diff
changeset
|
249 endfunc |
8522
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
250 |
27495
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
251 func Test_start_autoload() |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
252 " plugin foo with an autoload directory |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
253 let autodir = &packpath .. '/pack/mine/start/foo/autoload' |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
254 call mkdir(autodir, 'p') |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
255 let fname = autodir .. '/foobar.vim' |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
256 call writefile(['func foobar#test()', |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
257 \ ' return 1666', |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
258 \ 'endfunc'], fname) |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
259 |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
260 call assert_equal(1666, foobar#test()) |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
261 endfunc |
b98c20b53a2d
patch 8.2.4275: cannot use an autoload function from a package under start
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
262 |
8522
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
263 func Test_helptags() |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
264 let docdir1 = &packpath . '/pack/mine/start/foo/doc' |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
265 let docdir2 = &packpath . '/pack/mine/start/bar/doc' |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
266 call mkdir(docdir1, 'p') |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
267 call mkdir(docdir2, 'p') |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
268 call writefile(['look here: *look-here*'], docdir1 . '/bar.txt') |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
269 call writefile(['look away: *look-away*'], docdir2 . '/foo.txt') |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
270 exe 'set rtp=' . &packpath . '/pack/mine/start/foo,' . &packpath . '/pack/mine/start/bar' |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
271 |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
272 helptags ALL |
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
273 |
31819
aec031683d61
patch 9.0.1242: code for :runtime completion is not consistent
Bram Moolenaar <Bram@vim.org>
parents:
31811
diff
changeset
|
274 let tags1 = readfile(docdir1 . '/tags') |
13190
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
275 call assert_match('look-here', tags1[0]) |
31819
aec031683d61
patch 9.0.1242: code for :runtime completion is not consistent
Bram Moolenaar <Bram@vim.org>
parents:
31811
diff
changeset
|
276 let tags2 = readfile(docdir2 . '/tags') |
13190
9fccd578ce1f
patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Christian Brabandt <cb@256bit.org>
parents:
13045
diff
changeset
|
277 call assert_match('look-away', tags2[0]) |
19231
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
14683
diff
changeset
|
278 |
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
14683
diff
changeset
|
279 call assert_fails('helptags abcxyz', 'E150:') |
8522
721e8d6cb7b5
commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents:
8520
diff
changeset
|
280 endfunc |
8524
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
281 |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
282 func Test_colorscheme() |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
283 let colordirrun = &packpath . '/runtime/colors' |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
284 let colordirstart = &packpath . '/pack/mine/start/foo/colors' |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
285 let colordiropt = &packpath . '/pack/mine/opt/bar/colors' |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
286 call mkdir(colordirrun, 'p') |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
287 call mkdir(colordirstart, 'p') |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
288 call mkdir(colordiropt, 'p') |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
289 call writefile(['let g:found_one = 1'], colordirrun . '/one.vim') |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
290 call writefile(['let g:found_two = 1'], colordirstart . '/two.vim') |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
291 call writefile(['let g:found_three = 1'], colordiropt . '/three.vim') |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
292 exe 'set rtp=' . &packpath . '/runtime' |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
293 |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
294 colorscheme one |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
295 call assert_equal(1, g:found_one) |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
296 colorscheme two |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
297 call assert_equal(1, g:found_two) |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
298 colorscheme three |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
299 call assert_equal(1, g:found_three) |
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8522
diff
changeset
|
300 endfunc |
8526
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
301 |
8528
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
302 func Test_colorscheme_completion() |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
303 let colordirrun = &packpath . '/runtime/colors' |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
304 let colordirstart = &packpath . '/pack/mine/start/foo/colors' |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
305 let colordiropt = &packpath . '/pack/mine/opt/bar/colors' |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
306 call mkdir(colordirrun, 'p') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
307 call mkdir(colordirstart, 'p') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
308 call mkdir(colordiropt, 'p') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
309 call writefile(['let g:found_one = 1'], colordirrun . '/one.vim') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
310 call writefile(['let g:found_two = 1'], colordirstart . '/two.vim') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
311 call writefile(['let g:found_three = 1'], colordiropt . '/three.vim') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
312 exe 'set rtp=' . &packpath . '/runtime' |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
313 |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
314 let li=[] |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
315 call feedkeys(":colorscheme " . repeat("\<Tab>", 1) . "')\<C-B>call add(li, '\<CR>", 't') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
316 call feedkeys(":colorscheme " . repeat("\<Tab>", 2) . "')\<C-B>call add(li, '\<CR>", 't') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
317 call feedkeys(":colorscheme " . repeat("\<Tab>", 3) . "')\<C-B>call add(li, '\<CR>", 't') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
318 call feedkeys(":colorscheme " . repeat("\<Tab>", 4) . "')\<C-B>call add(li, '\<CR>", 'tx') |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
319 call assert_equal("colorscheme one", li[0]) |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
320 call assert_equal("colorscheme three", li[1]) |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
321 call assert_equal("colorscheme two", li[2]) |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
322 call assert_equal("colorscheme ", li[3]) |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
323 endfunc |
630300c7a26c
commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents:
8526
diff
changeset
|
324 |
8526
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
325 func Test_runtime() |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
326 let rundir = &packpath . '/runtime/extra' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
327 let startdir = &packpath . '/pack/mine/start/foo/extra' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
328 let optdir = &packpath . '/pack/mine/opt/bar/extra' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
329 call mkdir(rundir, 'p') |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
330 call mkdir(startdir, 'p') |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
331 call mkdir(optdir, 'p') |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
332 call writefile(['let g:sequence .= "run"'], rundir . '/bar.vim') |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
333 call writefile(['let g:sequence .= "start"'], startdir . '/bar.vim') |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
334 call writefile(['let g:sequence .= "foostart"'], startdir . '/foo.vim') |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
335 call writefile(['let g:sequence .= "opt"'], optdir . '/bar.vim') |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
336 call writefile(['let g:sequence .= "xxxopt"'], optdir . '/xxx.vim') |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
337 exe 'set rtp=' . &packpath . '/runtime' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
338 |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
339 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
340 runtime extra/bar.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
341 call assert_equal('run', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
342 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
343 runtime START extra/bar.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
344 call assert_equal('start', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
345 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
346 runtime OPT extra/bar.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
347 call assert_equal('opt', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
348 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
349 runtime PACK extra/bar.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
350 call assert_equal('start', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
351 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
352 runtime! PACK extra/bar.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
353 call assert_equal('startopt', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
354 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
355 runtime PACK extra/xxx.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
356 call assert_equal('xxxopt', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
357 |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
358 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
359 runtime ALL extra/bar.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
360 call assert_equal('run', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
361 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
362 runtime ALL extra/foo.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
363 call assert_equal('foostart', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
364 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
365 runtime! ALL extra/xxx.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
366 call assert_equal('xxxopt', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
367 let g:sequence = '' |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
368 runtime! ALL extra/bar.vim |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
369 call assert_equal('runstartopt', g:sequence) |
981cc3bef9f3
commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents:
8524
diff
changeset
|
370 endfunc |
19231
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
14683
diff
changeset
|
371 |
31798
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
372 func Test_runtime_completion() |
31811
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
373 let rundir = &packpath . '/runtime/Aextra' |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
374 let startdir = &packpath . '/pack/mine/start/foo/Aextra' |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
375 let optdir = &packpath . '/pack/mine/opt/bar/Aextra' |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
376 call mkdir(rundir . '/Arunbaz', 'p') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
377 call mkdir(startdir . '/Astartbaz', 'p') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
378 call mkdir(optdir . '/Aoptbaz', 'p') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
379 call writefile([], rundir . '/../Arunfoo.vim') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
380 call writefile([], rundir . '/Arunbar.vim') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
381 call writefile([], rundir . '/Aunrelated') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
382 call writefile([], rundir . '/../Aunrelated') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
383 call writefile([], startdir . '/../Astartfoo.vim') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
384 call writefile([], startdir . '/Astartbar.vim') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
385 call writefile([], startdir . '/Aunrelated') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
386 call writefile([], startdir . '/../Aunrelated') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
387 call writefile([], optdir . '/../Aoptfoo.vim') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
388 call writefile([], optdir . '/Aoptbar.vim') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
389 call writefile([], optdir . '/Aunrelated') |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
390 call writefile([], optdir . '/../Aunrelated') |
31798
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
391 exe 'set rtp=' . &packpath . '/runtime' |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
392 |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
393 func Check_runtime_completion(arg, arg1, res) |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
394 call feedkeys(':runtime ' .. a:arg .. "\<C-A>\<C-B>\"\<CR>", 'xt') |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
395 call assert_equal('"runtime ' .. a:arg1 .. join(a:res), @:) |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
396 call assert_equal(a:res, getcompletion(a:arg, 'runtime')) |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
397 endfunc |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
398 |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
399 call Check_runtime_completion('', '', |
31811
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
400 \ ['Aextra/', 'Arunfoo.vim', 'START', 'OPT', 'PACK', 'ALL']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
401 call Check_runtime_completion('S', '', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
402 \ ['START']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
403 call Check_runtime_completion('O', '', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
404 \ ['OPT']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
405 call Check_runtime_completion('P', '', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
406 \ ['PACK']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
407 call Check_runtime_completion('A', '', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
408 \ ['Aextra/', 'Arunfoo.vim', 'ALL']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
409 call Check_runtime_completion('Aextra/', '', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
410 \ ['Aextra/Arunbar.vim', 'Aextra/Arunbaz/']) |
31798
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
411 |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
412 call Check_runtime_completion('START ', 'START ', |
31811
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
413 \ ['Aextra/', 'Astartfoo.vim']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
414 call Check_runtime_completion('START A', 'START ', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
415 \ ['Aextra/', 'Astartfoo.vim']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
416 call Check_runtime_completion('START Aextra/', 'START ', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
417 \ ['Aextra/Astartbar.vim', 'Aextra/Astartbaz/']) |
31798
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
418 |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
419 call Check_runtime_completion('OPT ', 'OPT ', |
31811
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
420 \ ['Aextra/', 'Aoptfoo.vim']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
421 call Check_runtime_completion('OPT A', 'OPT ', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
422 \ ['Aextra/', 'Aoptfoo.vim']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
423 call Check_runtime_completion('OPT Aextra/', 'OPT ', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
424 \ ['Aextra/Aoptbar.vim', 'Aextra/Aoptbaz/']) |
31798
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
425 |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
426 call Check_runtime_completion('PACK ', 'PACK ', |
31811
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
427 \ ['Aextra/', 'Aoptfoo.vim', 'Astartfoo.vim']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
428 call Check_runtime_completion('PACK A', 'PACK ', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
429 \ ['Aextra/', 'Aoptfoo.vim', 'Astartfoo.vim']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
430 call Check_runtime_completion('PACK Aextra/', 'PACK ', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
431 \ ['Aextra/Aoptbar.vim', 'Aextra/Aoptbaz/', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
432 \ 'Aextra/Astartbar.vim', 'Aextra/Astartbaz/']) |
31798
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
433 |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
434 call Check_runtime_completion('ALL ', 'ALL ', |
31811
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
435 \ ['Aextra/', 'Aoptfoo.vim', 'Arunfoo.vim', 'Astartfoo.vim']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
436 call Check_runtime_completion('ALL A', 'ALL ', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
437 \ ['Aextra/', 'Aoptfoo.vim', 'Arunfoo.vim', 'Astartfoo.vim']) |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
438 call Check_runtime_completion('ALL Aextra/', 'ALL ', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
439 \ ['Aextra/Aoptbar.vim', 'Aextra/Aoptbaz/', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
440 \ 'Aextra/Arunbar.vim', 'Aextra/Arunbaz/', |
c5ff7d053fa1
patch 9.0.1238: :runtime completion can be further improved
Bram Moolenaar <Bram@vim.org>
parents:
31798
diff
changeset
|
441 \ 'Aextra/Astartbar.vim', 'Aextra/Astartbaz/']) |
31798
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
442 |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
443 delfunc Check_runtime_completion |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
444 endfunc |
5948cc887603
patch 9.0.1231: completion of :runtime does not handle {where} argument
Bram Moolenaar <Bram@vim.org>
parents:
30592
diff
changeset
|
445 |
19231
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
14683
diff
changeset
|
446 " vim: shiftwidth=2 sts=2 expandtab |