-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also fix up the patterns in light of said tests & code review.
- Loading branch information
1 parent
8c2b71f
commit 32120e5
Showing
8 changed files
with
141 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
1..10 | ||
1..10 # directive | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["plan", "1..10" ], | ||
["plan", "1..10 # directive" ] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks TAP plan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
TAP version 13 | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["version", "TAP version 13" ] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks TAP version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
ok | ||
--- | ||
message: "Failed with error 'hostname peebles.example.com not found'" | ||
severity: fail | ||
data: | ||
got: | ||
hostname: 'peebles.example.com' | ||
address: ~ | ||
expected: | ||
hostname: 'peebles.example.com' | ||
address: '85.193.201.85' | ||
... | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["pass", "ok"], | ||
["yamlish", [ | ||
["punctuation", "---"], | ||
["key", "message"], | ||
["punctuation", ":"], | ||
["string", "\"Failed with error 'hostname peebles.example.com not found'\""], | ||
["key", "severity"], | ||
["punctuation", ":"], | ||
" fail\n ", | ||
["key", "data"], | ||
["punctuation", ":"], | ||
["key", "got"], | ||
["punctuation", ":"], | ||
["key", "hostname"], | ||
["punctuation", ":"], | ||
["string", "'peebles.example.com'"], | ||
["key", "address"], | ||
["punctuation", ":"], | ||
["null", "~"], | ||
["key", "expected"], | ||
["punctuation", ":"], | ||
["key", "hostname"], | ||
["punctuation", ":"], | ||
["string", "'peebles.example.com'"], | ||
["key", "address"], | ||
["punctuation", ":"], | ||
["string", "'85.193.201.85'"], | ||
["punctuation", "..."] | ||
]] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks yaml embedding |