diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:22 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:22 +0300 |
| commit | 934382c8a1ce738589dee9ee0f14e1cec812770e (patch) | |
| tree | f13715762efd06518f8aec3a2bf39ac8a615987f /uvim/runtime/syntax/tap.vim | |
| parent | 0b24459ac12b6cf9fd5a401d647796ca254a8fa8 (diff) | |
| parent | 7088926316d8d4a7572a242d0765e99adfc8b083 (diff) | |
| download | Project-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.tar.gz Project-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.zip | |
Add 'uvim/' from commit '7088926316d8d4a7572a242d0765e99adfc8b083'
git-subtree-dir: uvim
git-subtree-mainline: 0b24459ac12b6cf9fd5a401d647796ca254a8fa8
git-subtree-split: 7088926316d8d4a7572a242d0765e99adfc8b083
Diffstat (limited to 'uvim/runtime/syntax/tap.vim')
| -rw-r--r-- | uvim/runtime/syntax/tap.vim | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/uvim/runtime/syntax/tap.vim b/uvim/runtime/syntax/tap.vim new file mode 100644 index 0000000000..6b00b1d588 --- /dev/null +++ b/uvim/runtime/syntax/tap.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" Language: Verbose TAP Output +" Maintainer: Rufus Cable <rufus@threebytesfull.com> +" Remark: Simple syntax highlighting for TAP output +" License: Vim License (see :help license) +" Copyright: (c) 2008-2013 Rufus Cable +" Last Change: 2020 Mar 15 + +if exists("b:current_syntax") + finish +endif + +syn match tapTestDiag /^ *#.*/ contains=tapTestTodo +syn match tapTestTime /^ *\[\d\d:\d\d:\d\d\].*/ contains=tapTestFile +syn match tapTestFile /\w\+\/[^. ]*/ contained +syn match tapTestFileWithDot /\w\+\/[^ ]*/ contained + +syn match tapTestPlan /^ *\d\+\.\.\d\+$/ + +" tapTest is a line like 'ok 1', 'not ok 2', 'ok 3 - xxxx' +syn match tapTest /^ *\(not \)\?ok \d\+.*/ contains=tapTestStatusOK,tapTestStatusNotOK,tapTestLine + +" tapTestLine is the line without the ok/not ok status - i.e. number and +" optional message +syn match tapTestLine /\d\+\( .*\|$\)/ contains=tapTestNumber,tapTestLoadMessage,tapTestTodo,tapTestSkip contained + +" turn ok/not ok messages green/red respectively +syn match tapTestStatusOK /ok/ contained +syn match tapTestStatusNotOK /not ok/ contained + +" highlight todo tests +syn match tapTestTodo /\c\(# TODO\|Failed (TODO)\) .*$/ contained contains=tapTestTodoRev +syn match tapTestTodoRev /\c\<TODO\>/ contained + +" highlight skipped tests +syn match tapTestSkip /\c# skip .*$/ contained contains=tapTestSkipTag +syn match tapTestSkipTag /\c\(# \)\@<=skip\>/ contained + +" look behind so "ok 123" and "not ok 124" match test number +syn match tapTestNumber /\(ok \)\@<=\d\d*/ contained +syn match tapTestLoadMessage /\*\*\*.*\*\*\*/ contained contains=tapTestThreeStars,tapTestFileWithDot +syn match tapTestThreeStars /\*\*\*/ contained + +syn region tapTestRegion start=/^ *\(not \)\?ok.*$/me=e+1 end=/^\(\(not \)\?ok\|# Looks like you planned \|All tests successful\|Bailout called\)/me=s-1 fold transparent excludenl +syn region tapTestResultsOKRegion start=/^\(All tests successful\|Result: PASS\)/ end=/$/ +syn region tapTestResultsNotOKRegion start=/^\(# Looks like you planned \|Bailout called\|# Looks like you failed \|Result: FAIL\)/ end=/$/ +syn region tapTestResultsSummaryRegion start=/^Test Summary Report/ end=/^Files=.*$/ contains=tapTestResultsSummaryHeading,tapTestResultsSummaryNotOK + +syn region tapTestResultsSummaryHeading start=/^Test Summary Report/ end=/^-\+$/ contained +syn region tapTestResultsSummaryNotOK start=/TODO passed:/ end=/$/ contained + +syn region tapTestInstructionsRegion start=/\%1l/ end=/^$/ + +syn sync fromstart + +if !exists("did_tapverboseoutput_syntax_inits") + let did_tapverboseoutput_syntax_inits = 1 + + hi tapTestStatusOK term=bold ctermfg=green guifg=Green + hi tapTestStatusNotOK term=reverse ctermfg=black ctermbg=red guifg=Black guibg=Red + hi tapTestTodo term=bold ctermfg=yellow ctermbg=black guifg=Yellow guibg=Black + hi tapTestTodoRev term=reverse ctermfg=black ctermbg=yellow guifg=Black guibg=Yellow + hi tapTestSkip term=bold ctermfg=lightblue guifg=LightBlue + hi tapTestSkipTag term=reverse ctermfg=black ctermbg=lightblue guifg=Black guibg=LightBlue + hi tapTestTime term=bold ctermfg=blue guifg=Blue + hi tapTestFile term=reverse ctermfg=black ctermbg=yellow guibg=Black guifg=Yellow + hi tapTestLoadedFile term=bold ctermfg=black ctermbg=cyan guibg=Cyan guifg=Black + hi tapTestThreeStars term=reverse ctermfg=blue guifg=Blue + hi tapTestPlan term=bold ctermfg=yellow guifg=Yellow + + hi link tapTestFileWithDot tapTestLoadedFile + hi link tapTestNumber Number + hi link tapTestDiag Comment + + hi tapTestRegion ctermbg=green + + hi tapTestResultsOKRegion ctermbg=green ctermfg=black + hi tapTestResultsNotOKRegion ctermbg=red ctermfg=black + + hi tapTestResultsSummaryHeading ctermbg=blue ctermfg=white + hi tapTestResultsSummaryNotOK ctermbg=red ctermfg=black + + hi tapTestInstructionsRegion ctermbg=lightmagenta ctermfg=black +endif + +let b:current_syntax="tapVerboseOutput" |
