mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-08 19:44:47 +08:00
stop at failing test.
This commit is contained in:
18
unittest.vim
18
unittest.vim
@@ -1,13 +1,14 @@
|
|||||||
so zencoding.vim
|
|
||||||
if exists('g:user_zen_settings')
|
if exists('g:user_zen_settings')
|
||||||
let s:old_user_zen_settings = g:user_zen_settings
|
let s:old_user_zen_settings = g:user_zen_settings
|
||||||
unlet! g:user_zen_settings
|
unlet! g:user_zen_settings
|
||||||
endif
|
endif
|
||||||
|
so zencoding.vim
|
||||||
|
|
||||||
unlet! testgroups
|
unlet! testgroups
|
||||||
let oldmore=&more
|
let oldmore = &more
|
||||||
let &more=0
|
let &more = 0
|
||||||
let testgroups = eval(join(filter(split(substitute(join(readfile(expand('<sfile>')), "\n"), '.*\nfinish\n', '', ''), '\n', 1), "v:val !~ '^\"'")))
|
let testgroups = eval(join(filter(split(substitute(join(readfile(expand('<sfile>')), "\n"), '.*\nfinish\n', '', ''), '\n', 1), "v:val !~ '^\"'")))
|
||||||
|
let failed = 0
|
||||||
for testgroup in testgroups
|
for testgroup in testgroups
|
||||||
echohl MatchParen | echon "[" testgroup.category."]\n" | echohl None
|
echohl MatchParen | echon "[" testgroup.category."]\n" | echohl None
|
||||||
let tests = testgroup.tests
|
let tests = testgroup.tests
|
||||||
@@ -23,11 +24,16 @@ for testgroup in testgroups
|
|||||||
else
|
else
|
||||||
echohl WarningMsg | echon "ng\n" | echohl None
|
echohl WarningMsg | echon "ng\n" | echohl None
|
||||||
echohl ErrorMsg | echo "failed test #".(n+1) | echohl None
|
echohl ErrorMsg | echo "failed test #".(n+1) | echohl None
|
||||||
echo " expect:".tests[n].result
|
echo " expect:".tests[n].result
|
||||||
echo " got:".res
|
echo " got:".res
|
||||||
echo ""
|
echo ""
|
||||||
|
let failed = 1
|
||||||
|
break
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
if failed
|
||||||
|
break
|
||||||
|
endif
|
||||||
echo "past:".reltimestr(reltime(start))."\n"
|
echo "past:".reltimestr(reltime(start))."\n"
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user