-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TAP component #1430
Add TAP component #1430
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Prism.languages.tap = { | ||
fail: /not ok[^#{\n\r]*/, | ||
pass: /ok[^#{\n\r]*/, | ||
pragma: /pragma [+-][a-z]+/, | ||
bailout: /bail out!.*/i, | ||
version: /TAP version \d+/i, | ||
plan: /\d+\.\.\d+(?: +#.*)?/, | ||
subtest: { | ||
pattern: /# Subtest(?:: .*)?/, | ||
greedy: true | ||
}, | ||
punctuation: /[{}]/, | ||
directive: /#.*/, | ||
yamlish: { | ||
pattern: /(^[^\S\r\n]*)---(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?[^\S\r\n]*\.\.\.$/m, | ||
lookbehind: true, | ||
inside: Prism.languages.yaml, | ||
alias: 'language-yaml' | ||
} | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Bail out! Couldn't connect to database. | ||
bail out! Failed to call API. | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["bailout", "Bail out! Couldn't connect to database."], | ||
["bailout", "bail out! Failed to call API."] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks bail out |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ok # SKIP test not written | ||
ok 42 this is the description # TODO write test | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["pass", "ok " ], | ||
["directive", "# SKIP test not written"], | ||
["pass", "ok 42 this is the description "], | ||
["directive", "# TODO write test"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks directives |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
not ok | ||
not ok 42 this is the description of the test | ||
ok | ||
ok 42 this is the description of the test | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["fail", "not ok" ], | ||
["fail", "not ok 42 this is the description of the test"], | ||
["pass", "ok" ], | ||
["pass", "ok 42 this is the description of the test"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks test pass & fail together correctly | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
1..10 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
1..10 # directive | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["plan", "1..10" ], | ||
["plan", "1..10 # directive" ] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks TAP plan |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
pragma +strict | ||
pragma -strict | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["pragma", "pragma +strict"], | ||
["pragma", "pragma -strict"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks pragma |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
TAP version 13 | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["version", "TAP version 13" ] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks TAP version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering you added this test, I think it can be overkill to also have the
pass_feature
andfail_feature
tests separately.