-
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
output tests for consuming static child test output
Simulates cases where the 'TAP_etc' environs aren't handled in any sort of way in the child process test. Particularly, the output for bail-on-failure and buffered parent when the non-buffered non-bail-on-fail child has a failure midstream, is not very ideal. Printing the extra data is debatably valuable, but the fact that it lists the test name as the bailout reason rather than the original failure is very unfortunate. Ideally, it'd be treated just like when a non-child-process test bails out.
- Loading branch information
Showing
15 changed files
with
315 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
TAP version 13 | ||
not ok 1 - ___/.*/~~~child-text-buffer.js buffer { | ||
not ok 1 - parent { | ||
not ok 1 - child { | ||
not ok 1 - grandchild { | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
Bail out! # ___/.*/~~~child-text-buffer.js buffer | ||
|
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 | ||
# Subtest: ___/.*/~~~child-text-buffer.js buffer | ||
not ok 1 - parent { | ||
not ok 1 - child { | ||
not ok 1 - grandchild { | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
Bail out! # burn | ||
Bail out! # burn | ||
|
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,24 @@ | ||
TAP version 13 | ||
not ok 1 - ___/.*/~~~child-text-buffer.js buffer { | ||
not ok 1 - parent { | ||
not ok 1 - child { | ||
not ok 1 - grandchild { | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
|
||
1..1 | ||
# failed 1 of 1 tests | ||
___/# time=[0-9.]+(ms)?/~~~ | ||
|
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,25 @@ | ||
if (process.argv[2] === 'buffer') { | ||
console.log(function () { /* | ||
TAP version 13 | ||
not ok 1 - parent { | ||
not ok 1 - child { | ||
not ok 1 - grandchild { | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
*/}.toString().split('\n').slice(1, -1).join('\n')) | ||
} else { | ||
var t = require('../..') | ||
var extra = { diagnostic: false } | ||
t.spawn(process.execPath, [__filename, 'buffer'], '', {}, extra) | ||
} |
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,24 @@ | ||
TAP version 13 | ||
# Subtest: ___/.*/~~~child-text-buffer.js buffer | ||
not ok 1 - parent { | ||
not ok 1 - child { | ||
not ok 1 - grandchild { | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - ___/.*/~~~child-text-buffer.js buffer ___/# time=[0-9.]+(ms)?/~~~ | ||
|
||
1..1 | ||
# failed 1 of 1 tests | ||
___/# time=[0-9.]+(ms)?/~~~ | ||
|
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,21 @@ | ||
TAP version 13 | ||
not ok 1 - ___/.*/~~~child-text-indentsub.js indentsub { | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
not ok 1 - grandchild | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - child | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - parent | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
Bail out! # ___/.*/~~~child-text-indentsub.js indentsub | ||
|
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 | ||
# Subtest: ___/.*/~~~child-text-indentsub.js indentsub | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
Bail out! # burn | ||
Bail out! # burn | ||
|
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,24 @@ | ||
TAP version 13 | ||
not ok 1 - ___/.*/~~~child-text-indentsub.js indentsub { | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
not ok 1 - grandchild | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - child | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - parent | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
|
||
1..1 | ||
# failed 1 of 1 tests | ||
___/# time=[0-9.]+(ms)?/~~~ | ||
|
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,25 @@ | ||
if (process.argv[2] === 'indentsub') { | ||
console.log(function () { /* | ||
TAP version 13 | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
not ok 1 - grandchild | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - child | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - parent | ||
1..1 | ||
# failed 1 of 1 tests | ||
*/}.toString().split('\n').slice(1, -1).join('\n')) | ||
} else { | ||
var t = require('../..') | ||
var extra = { diagnostic: false } | ||
t.spawn(process.execPath, [__filename, 'indentsub'], '', {}, extra) | ||
} |
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,24 @@ | ||
TAP version 13 | ||
# Subtest: ___/.*/~~~child-text-indentsub.js indentsub | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
not ok 1 - grandchild | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - child | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - parent | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - ___/.*/~~~child-text-indentsub.js indentsub ___/# time=[0-9.]+(ms)?/~~~ | ||
|
||
1..1 | ||
# failed 1 of 1 tests | ||
___/# time=[0-9.]+(ms)?/~~~ | ||
|
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,21 @@ | ||
TAP version 13 | ||
not ok 1 - ___/.*/~~~child-text-sub.js sub { | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
not ok 1 - grandchild | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - child | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - parent | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
Bail out! # ___/.*/~~~child-text-sub.js sub | ||
|
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 | ||
# Subtest: ___/.*/~~~child-text-sub.js sub | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
Bail out! # burn | ||
Bail out! # burn | ||
|
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,24 @@ | ||
TAP version 13 | ||
not ok 1 - ___/.*/~~~child-text-sub.js sub { | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
not ok 1 - grandchild | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - child | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - parent | ||
1..1 | ||
# failed 1 of 1 tests | ||
} | ||
|
||
1..1 | ||
# failed 1 of 1 tests | ||
___/# time=[0-9.]+(ms)?/~~~ | ||
|
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,25 @@ | ||
if (process.argv[2] === 'sub') { | ||
console.log(function () { /* | ||
TAP version 13 | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
not ok 1 - grandchild | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - child | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - parent | ||
1..1 | ||
# failed 1 of 1 tests | ||
*/}.toString().split('\n').slice(1, -1).join('\n')) | ||
} else { | ||
var t = require('../..') | ||
var extra = { diagnostic: false } | ||
t.spawn(process.execPath, [__filename, 'sub'], '', {}, extra) | ||
} |
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,24 @@ | ||
TAP version 13 | ||
# Subtest: ___/.*/~~~child-text-sub.js sub | ||
# Subtest: parent | ||
# Subtest: child | ||
# Subtest: grandchild | ||
ok 1 - this is fine | ||
not ok 2 - burn | ||
1..2 | ||
# failed 1 of 2 tests | ||
not ok 1 - grandchild | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - child | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - parent | ||
1..1 | ||
# failed 1 of 1 tests | ||
not ok 1 - ___/.*/~~~child-text-sub.js sub ___/# time=[0-9.]+(ms)?/~~~ | ||
|
||
1..1 | ||
# failed 1 of 1 tests | ||
___/# time=[0-9.]+(ms)?/~~~ | ||
|