Mirror of the Vim source from https://github.com/vim/vim
Révision | 72e0ec552189b9f8f74ae85ca960db59570a9900 (tree) |
---|---|
l'heure | 2020-11-24 05:30:04 |
Auteur | Bram Moolenaar <Bram@vim....> |
Commiter | Bram Moolenaar |
patch 8.2.2037: compiler test depends on list of compiler plugins
Commit: https://github.com/vim/vim/commit/60bc8e7244080b7ead009cfabebc3401f272ddbe
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 23 21:24:58 2020 +0100
@@ -41,12 +41,18 @@ | ||
41 | 41 | bw! |
42 | 42 | endfunc |
43 | 43 | |
44 | +func GetCompilerNames() | |
45 | + return glob('$VIMRUNTIME/compiler/*.vim', 0, 1) | |
46 | + \ ->map({k, v -> substitute(v, '.*[\\/]\([a-zA-Z0-9_\-]*\).vim', '\1', '')}) | |
47 | +endfunc | |
48 | + | |
44 | 49 | func Test_compiler_without_arg() |
45 | 50 | let runtime = substitute($VIMRUNTIME, '\\', '/', 'g') |
46 | 51 | let a = split(execute('compiler')) |
47 | - call assert_match(runtime .. '/compiler/ant.vim$', a[0]) | |
48 | - call assert_match(runtime .. '/compiler/bcc.vim$', a[1]) | |
49 | - call assert_match(runtime .. '/compiler/xo.vim$', a[-1]) | |
52 | + let exp = GetCompilerNames() | |
53 | + call assert_match(runtime .. '/compiler/' .. exp[0] .. '.vim$', a[0]) | |
54 | + call assert_match(runtime .. '/compiler/' .. exp[1] .. '.vim$', a[1]) | |
55 | + call assert_match(runtime .. '/compiler/' .. exp[-1] .. '.vim$', a[-1]) | |
50 | 56 | endfunc |
51 | 57 | |
52 | 58 | " Test executing :compiler from the command line, not from a script |
@@ -59,8 +65,9 @@ | ||
59 | 65 | endfunc |
60 | 66 | |
61 | 67 | func Test_compiler_completion() |
68 | + let clist = GetCompilerNames()->join(' ') | |
62 | 69 | call feedkeys(":compiler \<C-A>\<C-B>\"\<CR>", 'tx') |
63 | - call assert_match('^"compiler ant bcc .* xmlwf xo$', @:) | |
70 | + call assert_match('^"compiler ' .. clist .. '$', @:) | |
64 | 71 | |
65 | 72 | call feedkeys(":compiler p\<C-A>\<C-B>\"\<CR>", 'tx') |
66 | 73 | call assert_equal('"compiler pbx perl php pylint pyunit', @:) |
@@ -751,6 +751,8 @@ | ||
751 | 751 | static int included_patches[] = |
752 | 752 | { /* Add new patch number below this line */ |
753 | 753 | /**/ |
754 | + 2037, | |
755 | +/**/ | |
754 | 756 | 2036, |
755 | 757 | /**/ |
756 | 758 | 2035, |