annotate src/testdir/test_packadd.vim @ 8528:630300c7a26c v7.4.1554

commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 13 13:24:45 2016 +0100 patch 7.4.1554 Problem: Completion for :colorscheme does not use 'packpath'. Solution: Make it work, add a test. (Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Sun, 13 Mar 2016 13:30:04 +0100
parents 981cc3bef9f3
children 6d92bbe6c7de
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 func SetUp()
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 let s:topdir = expand('%:h') . '/Xdir'
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 exe 'set packpath=' . s:topdir
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 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
7 endfunc
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 func TearDown()
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 call delete(s:topdir, 'rf')
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 endfunc
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 func Test_packadd()
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 call mkdir(s:plugdir . '/plugin', 'p')
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 call mkdir(s:plugdir . '/ftdetect', 'p')
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 set rtp&
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 let rtp = &rtp
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 filetype on
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 exe 'split ' . s:plugdir . '/plugin/test.vim'
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 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
22 wq
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 exe 'split ' . s:plugdir . '/ftdetect/test.vim'
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 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
26 wq
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 packadd mytest
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 call assert_equal(42, g:plugin_works)
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 call assert_equal(17, g:ftdetect_works)
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 call assert_true(len(&rtp) > len(rtp))
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 call assert_true(&rtp =~ 'testdir/Xdir/pack/mine/opt/mytest\($\|,\)')
8416
1a6527cce675 commit https://github.com/vim/vim/commit/be82c254862e475a582c0717455e1db6bf96b0d0
Christian Brabandt <cb@256bit.org>
parents: 8402
diff changeset
34
1a6527cce675 commit https://github.com/vim/vim/commit/be82c254862e475a582c0717455e1db6bf96b0d0
Christian Brabandt <cb@256bit.org>
parents: 8402
diff changeset
35 " Check exception
1a6527cce675 commit https://github.com/vim/vim/commit/be82c254862e475a582c0717455e1db6bf96b0d0
Christian Brabandt <cb@256bit.org>
parents: 8402
diff changeset
36 call assert_fails("packadd directorynotfound", 'E919:')
1a6527cce675 commit https://github.com/vim/vim/commit/be82c254862e475a582c0717455e1db6bf96b0d0
Christian Brabandt <cb@256bit.org>
parents: 8402
diff changeset
37 call assert_fails("packadd", 'E471:')
8388
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 endfunc
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 func Test_packadd_noload()
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 call mkdir(s:plugdir . '/plugin', 'p')
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 call mkdir(s:plugdir . '/syntax', 'p')
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 set rtp&
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 let rtp = &rtp
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 exe 'split ' . s:plugdir . '/plugin/test.vim'
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 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
48 wq
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 let g:plugin_works = 0
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 packadd! mytest
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52
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))
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 call assert_true(&rtp =~ 'testdir/Xdir/pack/mine/opt/mytest\($\|,\)')
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 call assert_equal(0, g:plugin_works)
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 " check the path is not added twice
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 let new_rtp = &rtp
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 packadd! mytest
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 call assert_equal(new_rtp, &rtp)
f5972de59001 commit https://github.com/vim/vim/commit/f3654827368e6204608036353a0360e9e7c21e02
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 endfunc
8402
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
62
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
63 " Check command-line completion for 'packadd'
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
64 func Test_packadd_completion()
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
65 let optdir1 = &packpath . '/pack/mine/opt'
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
66 let optdir2 = &packpath . '/pack/candidate/opt'
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
67
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
68 call mkdir(optdir1 . '/pluginA', 'p')
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
69 call mkdir(optdir1 . '/pluginC', 'p')
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
70 call mkdir(optdir2 . '/pluginB', 'p')
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
71 call mkdir(optdir2 . '/pluginC', 'p')
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
72
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
73 let li = []
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
74 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
75 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
76 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
77 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
78 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
79 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
80 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
81 call assert_equal("packadd ", li[3])
eed1ca42f9aa commit https://github.com/vim/vim/commit/35ca0e7a1cb6e6daef8e0052a8437801226cef19
Christian Brabandt <cb@256bit.org>
parents: 8388
diff changeset
82 endfunc
8520
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
83
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
84 func Test_packloadall()
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
85 let plugindir = &packpath . '/pack/mine/start/foo/plugin'
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
86 call mkdir(plugindir, 'p')
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
87 call writefile(['let g:plugin_foo_number = 1234'], plugindir . '/bar.vim')
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
88 packloadall
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
89 call assert_equal(1234, g:plugin_foo_number)
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
90
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
91 " only works once
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
92 call writefile(['let g:plugin_bar_number = 4321'], plugindir . '/bar2.vim')
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
93 packloadall
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
94 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
95
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
96 " works when ! used
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
97 packloadall!
b4350a4d1e01 commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Christian Brabandt <cb@256bit.org>
parents: 8416
diff changeset
98 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
99 endfunc
8522
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
100
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
101 func Test_helptags()
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
102 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
103 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
104 call mkdir(docdir1, 'p')
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
105 call mkdir(docdir2, 'p')
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
106 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
107 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
108 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
109
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
110 helptags ALL
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
111
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
112 let tags1 = readfile(docdir1 . '/tags')
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
113 call assert_true(tags1[0] =~ 'look-here')
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
114 let tags2 = readfile(docdir2 . '/tags')
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
115 call assert_true(tags2[0] =~ 'look-away')
721e8d6cb7b5 commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d
Christian Brabandt <cb@256bit.org>
parents: 8520
diff changeset
116 endfunc
8524
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
117
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
118 func Test_colorscheme()
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
119 let colordirrun = &packpath . '/runtime/colors'
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
120 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
121 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
122 call mkdir(colordirrun, 'p')
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
123 call mkdir(colordirstart, 'p')
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
124 call mkdir(colordiropt, 'p')
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
125 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
126 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
127 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
128 exe 'set rtp=' . &packpath . '/runtime'
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
129
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
130 colorscheme one
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
131 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
132 colorscheme two
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
133 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
134 colorscheme three
2f57bbe870ea commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents: 8522
diff changeset
135 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
136 endfunc
8526
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
137
8528
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
138 func Test_colorscheme_completion()
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
139 let colordirrun = &packpath . '/runtime/colors'
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
140 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
141 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
142 call mkdir(colordirrun, 'p')
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
143 call mkdir(colordirstart, 'p')
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
144 call mkdir(colordiropt, 'p')
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
145 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
146 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
147 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
148 exe 'set rtp=' . &packpath . '/runtime'
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
149
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
150 let li=[]
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
151 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
152 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
153 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
154 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
155 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
156 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
157 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
158 call assert_equal("colorscheme ", li[3])
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
159 endfunc
630300c7a26c commit https://github.com/vim/vim/commit/52f9c19015df5ee1ee8592b6f3f15b8a57c8f5be
Christian Brabandt <cb@256bit.org>
parents: 8526
diff changeset
160
8526
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
161 func Test_runtime()
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
162 let rundir = &packpath . '/runtime/extra'
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
163 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
164 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
165 call mkdir(rundir, 'p')
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
166 call mkdir(startdir, 'p')
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
167 call mkdir(optdir, 'p')
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
168 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
169 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
170 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
171 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
172 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
173 exe 'set rtp=' . &packpath . '/runtime'
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
174
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
175 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
176 runtime extra/bar.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
177 call assert_equal('run', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
178 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
179 runtime START extra/bar.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
180 call assert_equal('start', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
181 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
182 runtime OPT extra/bar.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
183 call assert_equal('opt', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
184 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
185 runtime PACK extra/bar.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
186 call assert_equal('start', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
187 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
188 runtime! PACK extra/bar.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
189 call assert_equal('startopt', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
190 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
191 runtime PACK extra/xxx.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
192 call assert_equal('xxxopt', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
193
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
194 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
195 runtime ALL extra/bar.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
196 call assert_equal('run', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
197 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
198 runtime ALL extra/foo.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
199 call assert_equal('foostart', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
200 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
201 runtime! ALL extra/xxx.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
202 call assert_equal('xxxopt', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
203 let g:sequence = ''
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
204 runtime! ALL extra/bar.vim
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
205 call assert_equal('runstartopt', g:sequence)
981cc3bef9f3 commit https://github.com/vim/vim/commit/8dcf259d904cfb965d31841dc74a5cfaf5a351d9
Christian Brabandt <cb@256bit.org>
parents: 8524
diff changeset
206 endfunc