mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.1648: result of syntax tests is hard to see
Problem: Result of syntax tests is hard to see. Solution: List the failed tests.
This commit is contained in:
@@ -26,7 +26,7 @@ test:
|
|||||||
@echo "../$(VIMPROG)" > testdir/vimcmd
|
@echo "../$(VIMPROG)" > testdir/vimcmd
|
||||||
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
|
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
|
||||||
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim
|
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim
|
||||||
@tail -n 5 testdir/messages
|
@tail -n 6 testdir/messages
|
||||||
|
|
||||||
|
|
||||||
clean testclean:
|
clean testclean:
|
||||||
|
@@ -40,7 +40,8 @@ endfunc
|
|||||||
exe 'split ' .. s:messagesFname
|
exe 'split ' .. s:messagesFname
|
||||||
call append(line('$'), repeat('=-', 70))
|
call append(line('$'), repeat('=-', 70))
|
||||||
call append(line('$'), '')
|
call append(line('$'), '')
|
||||||
call append(line('$'), 'Test run on ' .. strftime("%Y %b %d %H:%M:%S"))
|
let s:test_run_message = 'Test run on ' .. strftime("%Y %b %d %H:%M:%S")
|
||||||
|
call append(line('$'), s:test_run_message)
|
||||||
wq
|
wq
|
||||||
|
|
||||||
if syntaxDir !~ '[/\\]runtime[/\\]syntax\>'
|
if syntaxDir !~ '[/\\]runtime[/\\]syntax\>'
|
||||||
@@ -86,7 +87,7 @@ endfunc
|
|||||||
|
|
||||||
|
|
||||||
let ok_count = 0
|
let ok_count = 0
|
||||||
let failed_count = 0
|
let failed_tests = []
|
||||||
let skipped_count = 0
|
let skipped_count = 0
|
||||||
let MAX_FAILED_COUNT = 5
|
let MAX_FAILED_COUNT = 5
|
||||||
for fname in glob('input/*.*', 1, 1)
|
for fname in glob('input/*.*', 1, 1)
|
||||||
@@ -162,20 +163,21 @@ for fname in glob('input/*.*', 1, 1)
|
|||||||
|
|
||||||
call delete('done/' .. root)
|
call delete('done/' .. root)
|
||||||
|
|
||||||
let failed_count += 1
|
call failed_tests->extend(root)
|
||||||
if failed_count > MAX_FAILED_COUNT
|
if len(failed_tests) > MAX_FAILED_COUNT
|
||||||
call Message('')
|
call Message('')
|
||||||
call Message('Too many errors, aborting')
|
call Message('Too many errors, aborting')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
|
call Message("Test " .. root .. " skipped")
|
||||||
let skipped_count += 1
|
let skipped_count += 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Append messages to the file "testdir/messages"
|
" Append messages to the file "testdir/messages"
|
||||||
call AppendMessages('Input file ' .. fname .. ':')
|
call AppendMessages('Input file ' .. fname .. ':')
|
||||||
|
|
||||||
if failed_count > MAX_FAILED_COUNT
|
if len(failed_tests) > MAX_FAILED_COUNT
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
@@ -183,12 +185,13 @@ endfor
|
|||||||
" Matching "if 1" at the start.
|
" Matching "if 1" at the start.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
call Message(s:test_run_message)
|
||||||
call Message('OK: ' .. ok_count)
|
call Message('OK: ' .. ok_count)
|
||||||
call Message('FAILED: ' .. failed_count)
|
call Message('FAILED: ' .. len(failed_tests) .. ': ' .. string(failed_tests))
|
||||||
call Message('skipped: ' .. skipped_count)
|
call Message('skipped: ' .. skipped_count)
|
||||||
call AppendMessages('== SUMMARY ==')
|
call AppendMessages('== SUMMARY ==')
|
||||||
|
|
||||||
if failed_count > 0
|
if len(failed_tests) > 0
|
||||||
" have make report an error
|
" have make report an error
|
||||||
cquit
|
cquit
|
||||||
endif
|
endif
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1648,
|
||||||
/**/
|
/**/
|
||||||
1647,
|
1647,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user