diff options
Diffstat (limited to 'test/old/testdir')
| -rw-r--r-- | test/old/testdir/test_compiler.vim | 27 | 
1 files changed, 26 insertions, 1 deletions
| diff --git a/test/old/testdir/test_compiler.vim b/test/old/testdir/test_compiler.vim index 1310cbadfc..5e13eb37ba 100644 --- a/test/old/testdir/test_compiler.vim +++ b/test/old/testdir/test_compiler.vim @@ -20,12 +20,14 @@ func Test_compiler()    e Xfoo.pl    " Play nice with other tests.    defer setqflist([]) +    compiler perl    call assert_equal('perl', b:current_compiler)    call assert_fails('let g:current_compiler', 'E121:') -    let verbose_efm = execute('verbose set efm')    call assert_match('Last set from .*[/\\]compiler[/\\]perl.vim ', verbose_efm) +  " Not using the global value +  call assert_notequal('', &l:efm)    call setline(1, ['#!/usr/bin/perl -w', 'use strict;', 'my $foo=1'])    w! @@ -39,6 +41,29 @@ func Test_compiler()    call assert_match('\n \d\+ Xfoo.pl:3: Global symbol "$foo" '    \ .               'requires explicit package name', a) +  compiler make +  call assert_fails('let b:current_compiler', 'E121:') +  call assert_fails('let g:current_compiler', 'E121:') +  let verbose_efm = execute('verbose set efm') +  call assert_match('Last set from .*[/\\]compiler[/\\]make.vim ', verbose_efm) + +  compiler! perl +  call assert_equal('perl', b:current_compiler) +  call assert_equal('perl', g:current_compiler) +  let verbose_efm = execute('verbose set efm') +  call assert_match('Last set from .*[/\\]compiler[/\\]perl.vim ', verbose_efm) +  call assert_equal(verbose_efm, execute('verbose setglobal efm')) +  " Using the global value +  call assert_equal('', &l:efm) + +  compiler! make +  call assert_fails('let b:current_compiler', 'E121:') +  call assert_fails('let g:current_compiler', 'E121:') +  let verbose_efm = execute('verbose set efm') +  call assert_match('Last set from .*[/\\]compiler[/\\]make.vim ', verbose_efm) +  call assert_equal(verbose_efm, execute('verbose setglobal efm')) +  " Using the global value +  call assert_equal('', &l:efm)    let &shellslash = save_shellslash    call delete('Xfoo.pl') | 
