Patch 9.0.1648

3 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 22, 2023, 5:39:31 PM6/22/23
to vim...@googlegroups.com

Patch 9.0.1648 (after 9.0.1647)
Problem: Result of syntax tests is hard to see.
Solution: List the failed tests.
Files: runtime/syntax/Makefile, runtime/syntax/testdir/runtest.vim


*** ../vim-9.0.1647/runtime/syntax/Makefile 2023-06-22 21:56:33.979045818 +0100
--- runtime/syntax/Makefile 2023-06-22 22:31:04.780489845 +0100
***************
*** 26,32 ****
@echo "../$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim
! @tail -n 5 testdir/messages


clean testclean:
--- 26,32 ----
@echo "../$(VIMPROG)" > testdir/vimcmd
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim
! @tail -n 6 testdir/messages


clean testclean:
*** ../vim-9.0.1647/runtime/syntax/testdir/runtest.vim 2023-06-22 21:56:33.979045818 +0100
--- runtime/syntax/testdir/runtest.vim 2023-06-22 22:30:51.024485604 +0100
***************
*** 40,46 ****
exe 'split ' .. s:messagesFname
call append(line('$'), repeat('=-', 70))
call append(line('$'), '')
! call append(line('$'), 'Test run on ' .. strftime("%Y %b %d %H:%M:%S"))
wq

if syntaxDir !~ '[/\\]runtime[/\\]syntax\>'
--- 40,47 ----
exe 'split ' .. s:messagesFname
call append(line('$'), repeat('=-', 70))
call append(line('$'), '')
! let s:test_run_message = 'Test run on ' .. strftime("%Y %b %d %H:%M:%S")
! call append(line('$'), s:test_run_message)
wq

if syntaxDir !~ '[/\\]runtime[/\\]syntax\>'
***************
*** 86,92 ****


let ok_count = 0
! let failed_count = 0
let skipped_count = 0
let MAX_FAILED_COUNT = 5
for fname in glob('input/*.*', 1, 1)
--- 87,93 ----


let ok_count = 0
! let failed_tests = []
let skipped_count = 0
let MAX_FAILED_COUNT = 5
for fname in glob('input/*.*', 1, 1)
***************
*** 162,181 ****

call delete('done/' .. root)

! let failed_count += 1
! if failed_count > MAX_FAILED_COUNT
call Message('')
call Message('Too many errors, aborting')
endif
endif
else
let skipped_count += 1
endif

" Append messages to the file "testdir/messages"
call AppendMessages('Input file ' .. fname .. ':')

! if failed_count > MAX_FAILED_COUNT
break
endif
endfor
--- 163,183 ----

call delete('done/' .. root)

! call failed_tests->extend(root)
! if len(failed_tests) > MAX_FAILED_COUNT
call Message('')
call Message('Too many errors, aborting')
endif
endif
else
+ call Message("Test " .. root .. " skipped")
let skipped_count += 1
endif

" Append messages to the file "testdir/messages"
call AppendMessages('Input file ' .. fname .. ':')

! if len(failed_tests) > MAX_FAILED_COUNT
break
endif
endfor
***************
*** 183,194 ****
" Matching "if 1" at the start.
endif

call Message('OK: ' .. ok_count)
! call Message('FAILED: ' .. failed_count)
call Message('skipped: ' .. skipped_count)
call AppendMessages('== SUMMARY ==')

! if failed_count > 0
" have make report an error
cquit
endif
--- 185,197 ----
" Matching "if 1" at the start.
endif

+ call Message(s:test_run_message)
call Message('OK: ' .. ok_count)
! call Message('FAILED: ' .. len(failed_tests) .. ': ' .. string(failed_tests))
call Message('skipped: ' .. skipped_count)
call AppendMessages('== SUMMARY ==')

! if len(failed_tests) > 0
" have make report an error
cquit
endif
*** ../vim-9.0.1647/src/version.c 2023-06-22 21:56:33.987045816 +0100
--- src/version.c 2023-06-22 22:33:07.724522415 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1648,
/**/

--
msdn.microsoft.com:
ERROR_SUCCESS 0 (0x0) The operation completed successfully.
I have always suspected that for Microsoft success is an error.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages