]> luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/tap.js
Initial commit.
[flow-web.git] / static / highlight / languages / tap.js
1 /*! `tap` grammar compiled for Highlight.js 11.11.1 */
2 (function(){
3 var hljsGrammar = (function () {
4 'use strict';
5
6 /*
7 Language: Test Anything Protocol
8 Description: TAP, the Test Anything Protocol, is a simple text-based interface between testing modules in a test harness.
9 Requires: yaml.js
10 Author: Sergey Bronnikov <sergeyb@bronevichok.ru>
11 Website: https://testanything.org
12 */
13
14 function tap(hljs) {
15 return {
16 name: 'Test Anything Protocol',
17 case_insensitive: true,
18 contains: [
19 hljs.HASH_COMMENT_MODE,
20 // version of format and total amount of testcases
21 {
22 className: 'meta',
23 variants: [
24 { begin: '^TAP version (\\d+)$' },
25 { begin: '^1\\.\\.(\\d+)$' }
26 ]
27 },
28 // YAML block
29 {
30 begin: /---$/,
31 end: '\\.\\.\\.$',
32 subLanguage: 'yaml',
33 relevance: 0
34 },
35 // testcase number
36 {
37 className: 'number',
38 begin: ' (\\d+) '
39 },
40 // testcase status and description
41 {
42 className: 'symbol',
43 variants: [
44 { begin: '^ok' },
45 { begin: '^not ok' }
46 ]
47 }
48 ]
49 };
50 }
51
52 return tap;
53
54 })();
55
56 hljs.registerLanguage('tap', hljsGrammar);
57 })();