main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /*
|
---|
2 | Language: Test Anything Protocol
|
---|
3 | Description: TAP, the Test Anything Protocol, is a simple text-based interface between testing modules in a test harness.
|
---|
4 | Requires: yaml.js
|
---|
5 | Author: Sergey Bronnikov <sergeyb@bronevichok.ru>
|
---|
6 | Website: https://testanything.org
|
---|
7 | */
|
---|
8 |
|
---|
9 | function tap(hljs) {
|
---|
10 | return {
|
---|
11 | name: 'Test Anything Protocol',
|
---|
12 | case_insensitive: true,
|
---|
13 | contains: [
|
---|
14 | hljs.HASH_COMMENT_MODE,
|
---|
15 | // version of format and total amount of testcases
|
---|
16 | {
|
---|
17 | className: 'meta',
|
---|
18 | variants: [
|
---|
19 | {
|
---|
20 | begin: '^TAP version (\\d+)$'
|
---|
21 | },
|
---|
22 | {
|
---|
23 | begin: '^1\\.\\.(\\d+)$'
|
---|
24 | }
|
---|
25 | ]
|
---|
26 | },
|
---|
27 | // YAML block
|
---|
28 | {
|
---|
29 | begin: /---$/,
|
---|
30 | end: '\\.\\.\\.$',
|
---|
31 | subLanguage: 'yaml',
|
---|
32 | relevance: 0
|
---|
33 | },
|
---|
34 | // testcase number
|
---|
35 | {
|
---|
36 | className: 'number',
|
---|
37 | begin: ' (\\d+) '
|
---|
38 | },
|
---|
39 | // testcase status and description
|
---|
40 | {
|
---|
41 | className: 'symbol',
|
---|
42 | variants: [
|
---|
43 | {
|
---|
44 | begin: '^ok'
|
---|
45 | },
|
---|
46 | {
|
---|
47 | begin: '^not ok'
|
---|
48 | }
|
---|
49 | ]
|
---|
50 | }
|
---|
51 | ]
|
---|
52 | };
|
---|
53 | }
|
---|
54 |
|
---|
55 | module.exports = tap;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.