Fix variable substitution for multiple defaulted vars
The problem was that the python regex engine is strictly left-to-right, so matching `[^}]|\\}` against \\}} meant that the `\\` was consumed by the left of the `|`. The solution is to just switch them around. Also add a way to run python tests from within vim, so we can actually test this stuff.
This commit is contained in:
parent
52eff32651
commit
30eec0d93c
4 changed files with 121 additions and 4 deletions
|
|
@ -82,6 +82,16 @@ func! Abort( timer_id )
|
|||
qa!
|
||||
endfunc
|
||||
|
||||
func! TestLog( msg )
|
||||
if type( a:msg ) == v:t_string
|
||||
let msg = [ a:msg ]
|
||||
else
|
||||
let msg = a:msg
|
||||
endif
|
||||
|
||||
call extend( s:messages, msg )
|
||||
endfunc
|
||||
|
||||
func RunTheTest(test)
|
||||
echo 'Executing ' . a:test
|
||||
|
||||
|
|
@ -152,8 +162,6 @@ func RunTheTest(test)
|
|||
augroup END
|
||||
|
||||
exe 'call ' . a:test
|
||||
|
||||
au! EarlyExit
|
||||
catch /^\cskipped/
|
||||
call add(s:messages, ' Skipped')
|
||||
call add(s:skipped,
|
||||
|
|
@ -193,6 +201,8 @@ func RunTheTest(test)
|
|||
call s:TestFailed()
|
||||
endtry
|
||||
|
||||
au! EarlyExit
|
||||
|
||||
call timer_stop( timer )
|
||||
|
||||
" In case 'insertmode' was set and something went wrong, make sure it is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue