Mercurial > vim
annotate src/testdir/test_expand_dllpath.vim @ 17314:b60402471f69 v8.1.1656
patch 8.1.1656: popup window width is wrong when using Tabs
commit https://github.com/vim/vim/commit/e089c3fd6937524a14d22baa7562b0820f1343ac
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 9 20:25:25 2019 +0200
patch 8.1.1656: popup window width is wrong when using Tabs
Problem: Popup window width is wrong when using Tabs. (Paul Jolly)
Solution: Count tabs correctly. (closes https://github.com/vim/vim/issues/4637)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 09 Jul 2019 20:30:04 +0200 |
parents | 18cda18a38e2 |
children | 08940efa6b4e |
rev | line source |
---|---|
8941
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 func s:test_expand_dllpath(optname) |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 let $TEST_EXPAND_DLLPATH = '/dllpath/lib' . substitute(a:optname, '\zedll$', '.', '') |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 execute 'let dllpath_save = &' . a:optname |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 try |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 execute 'set ' . a:optname . '=$TEST_EXPAND_DLLPATH' |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 execute 'call assert_equal("' . $TEST_EXPAND_DLLPATH . '", &' . a:optname . ')' |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 execute 'set ' . a:optname . '=~' . $TEST_EXPAND_DLLPATH |
11862
18cda18a38e2
patch 8.0.0811: MS-Windows: test_expand_dllpath fails
Christian Brabandt <cb@256bit.org>
parents:
10966
diff
changeset
|
9 let home = substitute($HOME, '\\', '/', 'g') |
18cda18a38e2
patch 8.0.0811: MS-Windows: test_expand_dllpath fails
Christian Brabandt <cb@256bit.org>
parents:
10966
diff
changeset
|
10 execute 'call assert_equal("' . home . $TEST_EXPAND_DLLPATH . '", &' . a:optname . ')' |
8941
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 finally |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 execute 'let &' . a:optname . ' = dllpath_save' |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 let $TEST_EXPAND_DLLPATH = '' |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 endtry |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 endfunc |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 func s:generate_test_if_exists(optname) |
10966
398ad090256d
patch 8.0.0372: more options are not always defined
Christian Brabandt <cb@256bit.org>
parents:
9618
diff
changeset
|
18 if exists('+' . a:optname) |
8941
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 execute join([ |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 \ 'func Test_expand_' . a:optname . '()', |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 \ ' call s:test_expand_dllpath("' . a:optname . '")', |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 \ 'endfunc' |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 \ ], "\n") |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 endif |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 endfunc |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 call s:generate_test_if_exists('luadll') |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 call s:generate_test_if_exists('perldll') |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 call s:generate_test_if_exists('pythondll') |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 call s:generate_test_if_exists('pythonthreedll') |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 call s:generate_test_if_exists('rubydll') |
0e7b1897ceb3
commit https://github.com/vim/vim/commit/a6e42501424f6670fa864c739d2dc2eb764900b9
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 call s:generate_test_if_exists('tcldll') |