annotate runtime/syntax/tap.vim @ 33697:c79fc6fbbf1b

runtime(sh) Update sh syntax and add shDblParen to shCaseList (#13469) Commit: https://github.com/vim/vim/commit/1858e2b22ad168b1fd44a4efcd3a2b6cd9f6772d Author: Lucien Grondin <grondilu@yahoo.fr> Date: Thu Nov 2 20:33:56 2023 +0100 runtime(sh) Update sh syntax and add shDblParen to shCaseList (https://github.com/vim/vim/issues/13469) Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Nov 2023 20:45:03 +0100
parents d1fe80fb35e6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12499
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Vim syntax file
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Language: Verbose TAP Output
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Maintainer: Rufus Cable <rufus@threebytesfull.com>
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " Remark: Simple syntax highlighting for TAP output
29150
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
5 " License: Vim License (see :help license)
12499
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 " Copyright: (c) 2008-2013 Rufus Cable
29150
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
7 " Last Change: 2020 Mar 15
12499
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 if exists("b:current_syntax")
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 finish
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 endif
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 syn match tapTestDiag /^ *#.*/ contains=tapTestTodo
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 syn match tapTestTime /^ *\[\d\d:\d\d:\d\d\].*/ contains=tapTestFile
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 syn match tapTestFile /\w\+\/[^. ]*/ contained
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 syn match tapTestFileWithDot /\w\+\/[^ ]*/ contained
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 syn match tapTestPlan /^ *\d\+\.\.\d\+$/
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 " tapTest is a line like 'ok 1', 'not ok 2', 'ok 3 - xxxx'
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 syn match tapTest /^ *\(not \)\?ok \d\+.*/ contains=tapTestStatusOK,tapTestStatusNotOK,tapTestLine
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 " tapTestLine is the line without the ok/not ok status - i.e. number and
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 " optional message
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 syn match tapTestLine /\d\+\( .*\|$\)/ contains=tapTestNumber,tapTestLoadMessage,tapTestTodo,tapTestSkip contained
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 " turn ok/not ok messages green/red respectively
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 syn match tapTestStatusOK /ok/ contained
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 syn match tapTestStatusNotOK /not ok/ contained
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 " highlight todo tests
29150
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
32 syn match tapTestTodo /\c\(# TODO\|Failed (TODO)\) .*$/ contained contains=tapTestTodoRev
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
33 syn match tapTestTodoRev /\c\<TODO\>/ contained
12499
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 " highlight skipped tests
29150
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
36 syn match tapTestSkip /\c# skip .*$/ contained contains=tapTestSkipTag
d1fe80fb35e6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 12499
diff changeset
37 syn match tapTestSkipTag /\c\(# \)\@<=skip\>/ contained
12499
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 " look behind so "ok 123" and "not ok 124" match test number
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 syn match tapTestNumber /\(ok \)\@<=\d\d*/ contained
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 syn match tapTestLoadMessage /\*\*\*.*\*\*\*/ contained contains=tapTestThreeStars,tapTestFileWithDot
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 syn match tapTestThreeStars /\*\*\*/ contained
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 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
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 syn region tapTestResultsOKRegion start=/^\(All tests successful\|Result: PASS\)/ end=/$/
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 syn region tapTestResultsNotOKRegion start=/^\(# Looks like you planned \|Bailout called\|# Looks like you failed \|Result: FAIL\)/ end=/$/
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 syn region tapTestResultsSummaryRegion start=/^Test Summary Report/ end=/^Files=.*$/ contains=tapTestResultsSummaryHeading,tapTestResultsSummaryNotOK
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 syn region tapTestResultsSummaryHeading start=/^Test Summary Report/ end=/^-\+$/ contained
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 syn region tapTestResultsSummaryNotOK start=/TODO passed:/ end=/$/ contained
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 syn region tapTestInstructionsRegion start=/\%1l/ end=/^$/
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 syn sync fromstart
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 if !exists("did_tapverboseoutput_syntax_inits")
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 let did_tapverboseoutput_syntax_inits = 1
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 hi tapTestStatusOK term=bold ctermfg=green guifg=Green
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 hi tapTestStatusNotOK term=reverse ctermfg=black ctermbg=red guifg=Black guibg=Red
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 hi tapTestTodo term=bold ctermfg=yellow ctermbg=black guifg=Yellow guibg=Black
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 hi tapTestTodoRev term=reverse ctermfg=black ctermbg=yellow guifg=Black guibg=Yellow
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 hi tapTestSkip term=bold ctermfg=lightblue guifg=LightBlue
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 hi tapTestSkipTag term=reverse ctermfg=black ctermbg=lightblue guifg=Black guibg=LightBlue
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 hi tapTestTime term=bold ctermfg=blue guifg=Blue
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 hi tapTestFile term=reverse ctermfg=black ctermbg=yellow guibg=Black guifg=Yellow
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 hi tapTestLoadedFile term=bold ctermfg=black ctermbg=cyan guibg=Cyan guifg=Black
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 hi tapTestThreeStars term=reverse ctermfg=blue guifg=Blue
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 hi tapTestPlan term=bold ctermfg=yellow guifg=Yellow
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 hi link tapTestFileWithDot tapTestLoadedFile
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 hi link tapTestNumber Number
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 hi link tapTestDiag Comment
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75 hi tapTestRegion ctermbg=green
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77 hi tapTestResultsOKRegion ctermbg=green ctermfg=black
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 hi tapTestResultsNotOKRegion ctermbg=red ctermfg=black
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 hi tapTestResultsSummaryHeading ctermbg=blue ctermfg=white
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 hi tapTestResultsSummaryNotOK ctermbg=red ctermfg=black
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 hi tapTestInstructionsRegion ctermbg=lightmagenta ctermfg=black
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 endif
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85
d91cf2e26ef0 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 let b:current_syntax="tapVerboseOutput"