Package: vim Version: 2:8.2.0368-1 Severity: normal Tags: patch upstream Dear Maintainer,
* What led up to the situation? According to the TAP specification, the keywords "TODO" and "SKIP" are case-insensitive: https://testanything.org/tap-specification.html#directives Directives are special notes that follow a # on the test line. Only two are currently defined: TODO and SKIP. Note that these two keywords are not case-sensitive. * What exactly did you do (or not do) that was effective (or ineffective)? Please find attached a patch that lets those keywords be matched case insensitively: [[[ diff --git a/runtime/syntax/tap.vim b/runtime/syntax/tap.vim index db37bb8..10b1f1e 100644 --- a/runtime/syntax/tap.vim +++ b/runtime/syntax/tap.vim @@ -29,12 +29,12 @@ syn match tapTestStatusOK /ok/ contained syn match tapTestStatusNotOK /not ok/ contained " highlight todo tests -syn match tapTestTodo /\(# TODO\|Failed (TODO)\) .*$/ contained contains=tapTestTodoRev -syn match tapTestTodoRev /\<TODO\>/ contained +syn match tapTestTodo /\c\(# TODO\|Failed (TODO)\) .*$/ contained contains=tapTestTodoRev +syn match tapTestTodoRev /\c\<TODO\>/ contained " highlight skipped tests -syn match tapTestSkip /# skip .*$/ contained contains=tapTestSkipTag -syn match tapTestSkipTag /\(# \)\@<=skip\>/ contained +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 ]]] Here is a test file where the behaviour change may be observed: [[[ $ cat test.tap # make sure to have an empty line above the plan line! 1..3 ok 1 ok 2 # TODO foo ok 3 # SKIP bar $ ]]] Thanks, Daniel P.S. I think there are at least two other bugs in tap.vim: (1) As mentioned above, TAP syntax is not highlighted unless there is an empty line above the plan line; (2) syntax/tap.vim sets various fold.* options globally, rather than locally and via an ftplugin. However, let's keep this ticket about the skip case-sensitivity thing only.