From 8d1dbba290a05982bfb32de3a8993e54d4f429b5 Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 31 May 2015 15:31:46 -0700 Subject: [PATCH 1/4] Fix comment order Keep a queue of comments that occur when we're waiting on potential diags for a previous assert. Then emit those comment events all at once when we are sure that either the test point line is finished (without diags) or that the diags are done. Fix #18 Fix #19 Fix #20 --- index.js | 20 +- test/fixtures/comment-mid-diag.js | 30 ++ test/fixtures/comment-mid-diag.tap | 11 + test/fixtures/implicit-counter.js | 26 +- test/fixtures/implicit-counter.tap | 13 +- test/fixtures/no-plan.js | 8 +- test/fixtures/no-plan.tap | 4 +- test/fixtures/not-enough.js | 8 +- test/fixtures/not-enough.tap | 4 +- test/fixtures/not-ok-todo.js | 2 +- test/fixtures/not-ok.js | 2 +- test/fixtures/offset-mismatch.js | 2 +- test/fixtures/offset.js | 2 +- test/fixtures/ok.js | 2 +- test/fixtures/out-of-order.js | 2 +- test/fixtures/skipping-a-few.js | 2 +- test/fixtures/tap-tests-stdout.js | 406 +++++++++---------- test/fixtures/tap-tests.js | 404 +++++++++--------- test/fixtures/too-many.js | 2 +- test/fixtures/unknown-amount-and-failures.js | 2 +- 20 files changed, 506 insertions(+), 446 deletions(-) create mode 100644 test/fixtures/comment-mid-diag.js create mode 100644 test/fixtures/comment-mid-diag.tap diff --git a/index.js b/index.js index e2e5113..c022ff0 100644 --- a/index.js +++ b/index.js @@ -110,6 +110,7 @@ function Parser (options, onComplete) { this.yind = '' this.child = null this.current = null + this.commentQueue = [] this.count = 0 this.pass = 0 @@ -263,6 +264,13 @@ Parser.prototype.bailout = function (reason) { this.emit('bailout', reason) } +Parser.prototype.clearCommentQueue = function () { + for (var c = 0; c < this.commentQueue.length; c++) { + this.emit('comment', this.commentQueue[c]) + } + this.commentQueue.length = 0 +} + Parser.prototype.emitResult = function () { if (this.child) { this.child.end() @@ -273,7 +281,7 @@ Parser.prototype.emitResult = function () { this.yind = '' if (!this.current) - return + return this.clearCommentQueue() var res = this.current this.current = null @@ -294,6 +302,7 @@ Parser.prototype.emitResult = function () { this.todo++ this.emit('assert', res) + this.clearCommentQueue() } Parser.prototype.startChild = function (indent, line) { @@ -320,6 +329,13 @@ Parser.prototype.startChild = function (indent, line) { this.child.write(line.substr(indent.length)) } +Parser.prototype.emitComment = function (line) { + if (this.current || this.commentQueue.length) + this.commentQueue.push(line) + else + this.emit('comment', line) +} + Parser.prototype._parse = function (line) { // normalize line endings line = line.replace(/\r\n$/, '\n') @@ -337,7 +353,7 @@ Parser.prototype._parse = function (line) { // comment, but let "# Subtest:" comments start a child var c = line.match(/^(\s+)?#(.*)/) if (c && !(c[1] && /^ Subtest: /.test(c[2]))) { - this.emit('comment', line) + this.emitComment(line) return } diff --git a/test/fixtures/comment-mid-diag.js b/test/fixtures/comment-mid-diag.js new file mode 100644 index 0000000..97fdd82 --- /dev/null +++ b/test/fixtures/comment-mid-diag.js @@ -0,0 +1,30 @@ +module.exports = +[ [ 'line', 'TAP version 13\n' ], + [ 'version', '13' ], + [ 'line', '1..1\n' ], + [ 'plan', { start: 1, end: 1 } ], + [ 'line', '# before result\n' ], + [ 'comment', '# before result\n' ], + [ 'line', 'not ok 1 - please keep my diags\n' ], + [ 'line', ' # before diag\n' ], + [ 'line', ' ---\n' ], + [ 'line', ' # mid diag\n' ], + [ 'line', ' after: comment\n' ], + [ 'line', ' ...\n' ], + [ 'assert', + { ok: false, + id: 1, + name: 'please keep my diags', + diag: { after: 'comment' } } ], + [ 'comment', ' # before diag\n' ], + [ 'comment', ' # mid diag\n' ], + [ 'line', ' # after diag\n' ], + [ 'comment', ' # after diag\n' ], + [ 'line', '# after result\n' ], + [ 'comment', '# after result\n' ], + [ 'complete', + { ok: false, + count: 1, + pass: 0, + fail: 1, + plan: { start: 1, end: 1 } } ] ] diff --git a/test/fixtures/comment-mid-diag.tap b/test/fixtures/comment-mid-diag.tap new file mode 100644 index 0000000..f30b571 --- /dev/null +++ b/test/fixtures/comment-mid-diag.tap @@ -0,0 +1,11 @@ +TAP version 13 +1..1 +# before result +not ok 1 - please keep my diags + # before diag + --- + # mid diag + after: comment + ... + # after diag +# after result diff --git a/test/fixtures/implicit-counter.js b/test/fixtures/implicit-counter.js index fde4b7c..ad53965 100644 --- a/test/fixtures/implicit-counter.js +++ b/test/fixtures/implicit-counter.js @@ -1,19 +1,21 @@ module.exports = [ [ 'line', 'TAP version 13\n' ], [ 'version', '13' ], - [ 'line', '# beep\n' ], - [ 'comment', '# beep\n' ], - [ 'line', 'ok should be equal\n' ], - [ 'line', 'ok should be equivalent\n' ], - [ 'assert', { ok: true, id: 1, name: 'should be equal' } ], - [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], - [ 'line', 'ok should be equal\n' ], - [ 'assert', { ok: true, id: 2, name: 'should be equivalent' } ], - [ 'line', 'ok (unnamed assert)\n' ], - [ 'assert', { ok: true, id: 3, name: 'should be equal' } ], + [ 'line', '# before 1\n' ], + [ 'comment', '# before 1\n' ], + [ 'line', 'ok one\n' ], + [ 'line', 'ok two\n' ], + [ 'assert', { ok: true, id: 1, name: 'one' } ], + [ 'line', '# before 3\n' ], + [ 'line', 'ok three\n' ], + [ 'assert', { ok: true, id: 2, name: 'two' } ], + [ 'comment', '# before 3\n' ], + [ 'line', 'ok four\n' ], + [ 'assert', { ok: true, id: 3, name: 'three' } ], + [ 'line', '# after 4\n' ], [ 'line', '1..4\n' ], - [ 'assert', { ok: true, id: 4, name: '(unnamed assert)' } ], + [ 'assert', { ok: true, id: 4, name: 'four' } ], + [ 'comment', '# after 4\n' ], [ 'plan', { start: 1, end: 4 } ], [ 'line', '# tests 4\n' ], [ 'comment', '# tests 4\n' ], diff --git a/test/fixtures/implicit-counter.tap b/test/fixtures/implicit-counter.tap index d8e2500..7fc8dca 100644 --- a/test/fixtures/implicit-counter.tap +++ b/test/fixtures/implicit-counter.tap @@ -1,10 +1,11 @@ TAP version 13 -# beep -ok should be equal -ok should be equivalent -# boop -ok should be equal -ok (unnamed assert) +# before 1 +ok one +ok two +# before 3 +ok three +ok four +# after 4 1..4 # tests 4 diff --git a/test/fixtures/no-plan.js b/test/fixtures/no-plan.js index 87b8334..6020358 100644 --- a/test/fixtures/no-plan.js +++ b/test/fixtures/no-plan.js @@ -1,15 +1,15 @@ module.exports = [ [ 'line', 'TAP version 13\n' ], [ 'version', '13' ], - [ 'line', '# beep\n' ], - [ 'comment', '# beep\n' ], + [ 'line', '# before 1\n' ], + [ 'comment', '# before 1\n' ], [ 'line', 'ok 1 should be equal\n' ], [ 'line', 'ok 2 should be equivalent\n' ], [ 'assert', { ok: true, id: 1, name: 'should be equal' } ], - [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], + [ 'line', '# before 3\n' ], [ 'line', 'ok 3 should be equal\n' ], [ 'assert', { ok: true, id: 2, name: 'should be equivalent' } ], + [ 'comment', '# before 3\n' ], [ 'line', 'ok 4 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 3, name: 'should be equal' } ], [ 'assert', { ok: true, id: 4, name: '(unnamed assert)' } ], diff --git a/test/fixtures/no-plan.tap b/test/fixtures/no-plan.tap index f568b4f..3fa6304 100644 --- a/test/fixtures/no-plan.tap +++ b/test/fixtures/no-plan.tap @@ -1,7 +1,7 @@ TAP version 13 -# beep +# before 1 ok 1 should be equal ok 2 should be equivalent -# boop +# before 3 ok 3 should be equal ok 4 (unnamed assert) diff --git a/test/fixtures/not-enough.js b/test/fixtures/not-enough.js index dbf82f6..f9c6550 100644 --- a/test/fixtures/not-enough.js +++ b/test/fixtures/not-enough.js @@ -1,15 +1,15 @@ module.exports = [ [ 'line', 'TAP version 13\n' ], [ 'version', '13' ], - [ 'line', '# beep\n' ], - [ 'comment', '# beep\n' ], + [ 'line', '# before 1\n' ], + [ 'comment', '# before 1\n' ], [ 'line', 'ok 1 should be equal\n' ], [ 'line', 'ok 2 should be equivalent\n' ], [ 'assert', { ok: true, id: 1, name: 'should be equal' } ], - [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], + [ 'line', '# before 3\n' ], [ 'line', 'ok 3 should be equal\n' ], [ 'assert', { ok: true, id: 2, name: 'should be equivalent' } ], + [ 'comment', '# before 3\n' ], [ 'line', 'ok 4 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 3, name: 'should be equal' } ], [ 'line', '1..5\n' ], diff --git a/test/fixtures/not-enough.tap b/test/fixtures/not-enough.tap index 8bf2b88..c645ad5 100644 --- a/test/fixtures/not-enough.tap +++ b/test/fixtures/not-enough.tap @@ -1,8 +1,8 @@ TAP version 13 -# beep +# before 1 ok 1 should be equal ok 2 should be equivalent -# boop +# before 3 ok 3 should be equal ok 4 (unnamed assert) diff --git a/test/fixtures/not-ok-todo.js b/test/fixtures/not-ok-todo.js index ef75b94..3d353c8 100644 --- a/test/fixtures/not-ok-todo.js +++ b/test/fixtures/not-ok-todo.js @@ -6,13 +6,13 @@ module.exports = 'not ok 2 - should be equivalent # TODO but we will fix it later\n' ], [ 'assert', { ok: true, id: 1, name: 'should be equal' } ], [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], [ 'line', 'ok 3 - should be equal\n' ], [ 'assert', { ok: false, id: 2, todo: 'but we will fix it later', name: 'should be equivalent' } ], + [ 'comment', '# boop\n' ], [ 'line', 'ok 4 - (unnamed assert)\n' ], [ 'assert', { ok: true, id: 3, name: 'should be equal' } ], [ 'line', '1..4\n' ], diff --git a/test/fixtures/not-ok.js b/test/fixtures/not-ok.js index d21f2ac..fe4eec0 100644 --- a/test/fixtures/not-ok.js +++ b/test/fixtures/not-ok.js @@ -7,9 +7,9 @@ module.exports = [ 'line', 'not ok 2 should be equivalent\n' ], [ 'assert', { ok: true, id: 1, name: 'should be equal' } ], [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], [ 'line', 'ok 3 should be equal\n' ], [ 'assert', { ok: false, id: 2, name: 'should be equivalent' } ], + [ 'comment', '# boop\n' ], [ 'line', 'ok 4 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 3, name: 'should be equal' } ], [ 'line', '1..4\n' ], diff --git a/test/fixtures/offset-mismatch.js b/test/fixtures/offset-mismatch.js index 06e3547..96c2ed0 100644 --- a/test/fixtures/offset-mismatch.js +++ b/test/fixtures/offset-mismatch.js @@ -7,9 +7,9 @@ module.exports = [ 'line', 'ok 9 should be equivalent\n' ], [ 'assert', { ok: true, id: 8, name: 'should be equal' } ], [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], [ 'line', 'ok 10 should be equal\n' ], [ 'assert', { ok: true, id: 9, name: 'should be equivalent' } ], + [ 'comment', '# boop\n' ], [ 'line', 'ok 11 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 10, name: 'should be equal' } ], [ 'line', '1..4\n' ], diff --git a/test/fixtures/offset.js b/test/fixtures/offset.js index b6e2dba..50ebc7f 100644 --- a/test/fixtures/offset.js +++ b/test/fixtures/offset.js @@ -7,9 +7,9 @@ module.exports = [ 'line', 'ok 9 should be equivalent\n' ], [ 'assert', { ok: true, id: 8, name: 'should be equal' } ], [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], [ 'line', 'ok 10 should be equal\n' ], [ 'assert', { ok: true, id: 9, name: 'should be equivalent' } ], + [ 'comment', '# boop\n' ], [ 'line', 'ok 11 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 10, name: 'should be equal' } ], [ 'line', '8..11\n' ], diff --git a/test/fixtures/ok.js b/test/fixtures/ok.js index e7c5655..46757fd 100644 --- a/test/fixtures/ok.js +++ b/test/fixtures/ok.js @@ -7,9 +7,9 @@ module.exports = [ 'line', 'ok 2 should be equivalent\n' ], [ 'assert', { ok: true, id: 1, name: 'should be equal' } ], [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], [ 'line', 'ok 3 should be equal\n' ], [ 'assert', { ok: true, id: 2, name: 'should be equivalent' } ], + [ 'comment', '# boop\n' ], [ 'line', 'ok 4 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 3, name: 'should be equal' } ], [ 'line', '1..4\n' ], diff --git a/test/fixtures/out-of-order.js b/test/fixtures/out-of-order.js index 5dc9c8b..493db39 100644 --- a/test/fixtures/out-of-order.js +++ b/test/fixtures/out-of-order.js @@ -7,9 +7,9 @@ module.exports = [ 'line', 'ok 3 should be equivalent\n' ], [ 'assert', { ok: true, id: 1, name: 'should be equal' } ], [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], [ 'line', 'ok 2 should be equal\n' ], [ 'assert', { ok: true, id: 3, name: 'should be equivalent' } ], + [ 'comment', '# boop\n' ], [ 'line', 'ok 4 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 2, name: 'should be equal' } ], [ 'line', '1..4\n' ], diff --git a/test/fixtures/skipping-a-few.js b/test/fixtures/skipping-a-few.js index 6fc4871..bff15e5 100644 --- a/test/fixtures/skipping-a-few.js +++ b/test/fixtures/skipping-a-few.js @@ -5,10 +5,10 @@ module.exports = [ 'plan', { start: 1, end: 5 } ], [ 'line', 'ok 1 - approved operating system\n' ], [ 'line', '# $^0 is solaris\n' ], - [ 'comment', '# $^0 is solaris\n' ], [ 'line', 'ok 2 - # SKIP no /sys directory\n' ], [ 'assert', { ok: true, id: 1, name: 'approved operating system' } ], + [ 'comment', '# $^0 is solaris\n' ], [ 'line', 'ok 3 - # SKIP no /sys directory\n' ], [ 'assert', { ok: true, id: 2, skip: 'no /sys directory' } ], [ 'line', 'ok 4 - # SKIP no /sys directory\n' ], diff --git a/test/fixtures/tap-tests-stdout.js b/test/fixtures/tap-tests-stdout.js index 30a482c..e212caf 100644 --- a/test/fixtures/tap-tests-stdout.js +++ b/test/fixtures/tap-tests-stdout.js @@ -9,296 +9,296 @@ module.exports = [ 'comment', '# same buffers\n' ], [ 'line', 'ok 1 should be equivalent\n' ], [ 'line', '# not same buffers\n' ], - [ 'comment', '# not same buffers\n' ], [ 'line', 'ok 2 should not be equivalent\n' ], [ 'assert', { ok: true, id: 1, name: 'should be equivalent' } ], + [ 'comment', '# not same buffers\n' ], [ 'line', '# tests 2\n' ], - [ 'comment', '# tests 2\n' ], [ 'line', '# pass 2\n' ], - [ 'comment', '# pass 2\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 3 test/buffer_compare.js\n' ], [ 'assert', { ok: true, id: 2, name: 'should not be equivalent' } ], + [ 'comment', '# tests 2\n' ], + [ 'comment', '# pass 2\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# common.js\n' ], - [ 'comment', '# common.js\n' ], [ 'line', 'ok 4 just setup, nothing relevant\n' ], [ 'assert', { ok: true, id: 3, name: 'test/buffer_compare.js' } ], + [ 'comment', '# common.js\n' ], [ 'line', 'ok 5 test/common.js\n' ], [ 'assert', { ok: true, id: 4, name: 'just setup, nothing relevant' } ], [ 'line', '# consumer.js\n' ], - [ 'comment', '# consumer.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# basic.tap\n' ], - [ 'comment', '# basic.tap\n' ], [ 'line', 'ok 6 should be equivalent\n' ], [ 'assert', { ok: true, id: 5, name: 'test/common.js' } ], + [ 'comment', '# consumer.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# basic.tap\n' ], [ 'line', '# indent.tap\n' ], - [ 'comment', '# indent.tap\n' ], [ 'line', 'ok 7 should be equivalent\n' ], [ 'assert', { ok: true, id: 6, name: 'should be equivalent' } ], + [ 'comment', '# indent.tap\n' ], [ 'line', '# missing.tap\n' ], - [ 'comment', '# missing.tap\n' ], [ 'line', 'ok 8 should be equivalent\n' ], [ 'assert', { ok: true, id: 7, name: 'should be equivalent' } ], + [ 'comment', '# missing.tap\n' ], [ 'line', '# skip-all.tap\n' ], - [ 'comment', '# skip-all.tap\n' ], [ 'line', 'ok 9 should be equivalent\n' ], [ 'assert', { ok: true, id: 8, name: 'should be equivalent' } ], + [ 'comment', '# skip-all.tap\n' ], [ 'line', '# tap-tests.tap\n' ], - [ 'comment', '# tap-tests.tap\n' ], [ 'line', 'ok 10 should be equivalent\n' ], [ 'assert', { ok: true, id: 9, name: 'should be equivalent' } ], + [ 'comment', '# tap-tests.tap\n' ], [ 'line', '# yamlish.tap\n' ], - [ 'comment', '# yamlish.tap\n' ], [ 'line', 'ok 11 should be equivalent\n' ], [ 'assert', { ok: true, id: 10, name: 'should be equivalent' } ], + [ 'comment', '# yamlish.tap\n' ], [ 'line', '# tests 6\n' ], - [ 'comment', '# tests 6\n' ], [ 'line', '# pass 6\n' ], - [ 'comment', '# pass 6\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 12 test/consumer.js\n' ], [ 'assert', { ok: true, id: 11, name: 'should be equivalent' } ], + [ 'comment', '# tests 6\n' ], + [ 'comment', '# pass 6\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# debug-test.js\n' ], - [ 'comment', '# debug-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# debug test\n' ], - [ 'comment', '# debug test\n' ], [ 'line', 'ok 13 Should output debugger message\n' ], [ 'assert', { ok: true, id: 12, name: 'test/consumer.js' } ], + [ 'comment', '# debug-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# debug test\n' ], [ 'line', '# tests 1\n' ], - [ 'comment', '# tests 1\n' ], [ 'line', '# pass 1\n' ], - [ 'comment', '# pass 1\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 14 test/debug-test.js\n' ], [ 'assert', { ok: true, id: 13, name: 'Should output debugger message' } ], + [ 'comment', '# tests 1\n' ], + [ 'comment', '# pass 1\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# deep-strict.js\n' ], - [ 'comment', '# deep-strict.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# strictDeepEquals shouldn\'t care about key order\n' ], - [ 'comment', - '# strictDeepEquals shouldn\'t care about key order\n' ], [ 'line', 'ok 15 should be strictly equal\n' ], [ 'assert', { ok: true, id: 14, name: 'test/debug-test.js' } ], - [ 'line', - '# strictDeepEquals shouldn\'t care about key order recursively\n' ], + [ 'comment', '# deep-strict.js\n' ], + [ 'comment', '# TAP version 13\n' ], [ 'comment', + '# strictDeepEquals shouldn\'t care about key order\n' ], + [ 'line', '# strictDeepEquals shouldn\'t care about key order recursively\n' ], [ 'line', 'ok 16 should be strictly equal\n' ], [ 'assert', { ok: true, id: 15, name: 'should be strictly equal' } ], - [ 'line', - '# strictDeepEquals shoudn\'t care about key order (but still might)\n' ], [ 'comment', + '# strictDeepEquals shouldn\'t care about key order recursively\n' ], + [ 'line', '# strictDeepEquals shoudn\'t care about key order (but still might)\n' ], [ 'line', 'ok 17 should be strictly equal\n' ], [ 'assert', { ok: true, id: 16, name: 'should be strictly equal' } ], + [ 'comment', + '# strictDeepEquals shoudn\'t care about key order (but still might)\n' ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 18 test/deep-strict.js\n' ], [ 'assert', { ok: true, id: 17, name: 'should be strictly equal' } ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# deep.js\n' ], - [ 'comment', '# deep.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# deepEquals shouldn\'t care about key order and types\n' ], - [ 'comment', - '# deepEquals shouldn\'t care about key order and types\n' ], [ 'line', 'ok 19 should be equivalent\n' ], [ 'assert', { ok: true, id: 18, name: 'test/deep-strict.js' } ], - [ 'line', - '# deepEquals shouldn\'t care about key order recursively and types\n' ], + [ 'comment', '# deep.js\n' ], + [ 'comment', '# TAP version 13\n' ], [ 'comment', + '# deepEquals shouldn\'t care about key order and types\n' ], + [ 'line', '# deepEquals shouldn\'t care about key order recursively and types\n' ], [ 'line', 'ok 20 should be equivalent\n' ], [ 'assert', { ok: true, id: 19, name: 'should be equivalent' } ], - [ 'line', - '# deepEquals shoudn\'t care about key order (but still might) and types\n' ], [ 'comment', + '# deepEquals shouldn\'t care about key order recursively and types\n' ], + [ 'line', '# deepEquals shoudn\'t care about key order (but still might) and types\n' ], [ 'line', 'ok 21 should be equivalent\n' ], [ 'assert', { ok: true, id: 20, name: 'should be equivalent' } ], + [ 'comment', + '# deepEquals shoudn\'t care about key order (but still might) and types\n' ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 22 test/deep.js\n' ], [ 'assert', { ok: true, id: 21, name: 'should be equivalent' } ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# executed.sh\n' ], - [ 'comment', '# executed.sh\n' ], [ 'line', 'ok 23 File with executable bit should be executed\n' ], [ 'assert', { ok: true, id: 22, name: 'test/deep.js' } ], + [ 'comment', '# executed.sh\n' ], [ 'line', 'ok 24 test/executed.sh\n' ], [ 'assert', { ok: true, id: 23, name: 'File with executable bit should be executed' } ], [ 'line', '# exit-code.js\n' ], - [ 'comment', '# exit-code.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# exit code 1 when tap results show failure\n' ], - [ 'comment', '# exit code 1 when tap results show failure\n' ], [ 'line', '# test exits 0, has failures\n' ], - [ 'comment', '# test exits 0, has failures\n' ], [ 'line', 'ok 25 should be equal\n' ], [ 'assert', { ok: true, id: 24, name: 'test/executed.sh' } ], + [ 'comment', '# exit-code.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# exit code 1 when tap results show failure\n' ], + [ 'comment', '# test exits 0, has failures\n' ], [ 'line', 'ok 26 should be equal\n' ], [ 'assert', { ok: true, id: 25, name: 'should be equal' } ], [ 'line', '# test exits 1, has failures\n' ], - [ 'comment', '# test exits 1, has failures\n' ], [ 'line', 'ok 27 should be equal\n' ], [ 'assert', { ok: true, id: 26, name: 'should be equal' } ], + [ 'comment', '# test exits 1, has failures\n' ], [ 'line', 'ok 28 should be equal\n' ], [ 'assert', { ok: true, id: 27, name: 'should be equal' } ], [ 'line', '# test exits 1, has no failures\n' ], - [ 'comment', '# test exits 1, has no failures\n' ], [ 'line', 'ok 29 should be equal\n' ], [ 'assert', { ok: true, id: 28, name: 'should be equal' } ], + [ 'comment', '# test exits 1, has no failures\n' ], [ 'line', 'ok 30 should be equal\n' ], [ 'assert', { ok: true, id: 29, name: 'should be equal' } ], [ 'line', '# successes exit 0\n' ], - [ 'comment', '# successes exit 0\n' ], [ 'line', '# test that does nothing, but exits 0\n' ], - [ 'comment', '# test that does nothing, but exits 0\n' ], [ 'line', 'ok 31 should be equal\n' ], [ 'assert', { ok: true, id: 30, name: 'should be equal' } ], + [ 'comment', '# successes exit 0\n' ], + [ 'comment', '# test that does nothing, but exits 0\n' ], [ 'line', 'ok 32 should be equal\n' ], [ 'assert', { ok: true, id: 31, name: 'should be equal' } ], [ 'line', '# test that succeeds, and exits 0\n' ], - [ 'comment', '# test that succeeds, and exits 0\n' ], [ 'line', 'ok 33 should be equal\n' ], [ 'assert', { ok: true, id: 32, name: 'should be equal' } ], + [ 'comment', '# test that succeeds, and exits 0\n' ], [ 'line', 'ok 34 should be equal\n' ], [ 'assert', { ok: true, id: 33, name: 'should be equal' } ], [ 'line', '# tests 10\n' ], - [ 'comment', '# tests 10\n' ], [ 'line', '# pass 10\n' ], - [ 'comment', '# pass 10\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 35 test/exit-code.js\n' ], [ 'assert', { ok: true, id: 34, name: 'should be equal' } ], + [ 'comment', '# tests 10\n' ], + [ 'comment', '# pass 10\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# expose-gc-test.js\n' ], - [ 'comment', '# expose-gc-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# gc test when the gc isn\'t there\n' ], - [ 'comment', '# gc test when the gc isn\'t there\n' ], [ 'line', 'ok 36 should be equal\n' ], [ 'assert', { ok: true, id: 35, name: 'test/exit-code.js' } ], + [ 'comment', '# expose-gc-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# gc test when the gc isn\'t there\n' ], [ 'line', '# gc test when the gc should be there\n' ], - [ 'comment', '# gc test when the gc should be there\n' ], [ 'line', '# test for gc using --gc\n' ], - [ 'comment', '# test for gc using --gc\n' ], [ 'line', 'ok 37 should be equal\n' ], [ 'assert', { ok: true, id: 36, name: 'should be equal' } ], + [ 'comment', '# gc test when the gc should be there\n' ], + [ 'comment', '# test for gc using --gc\n' ], [ 'line', '# test for gc using --expose-gc\n' ], - [ 'comment', '# test for gc using --expose-gc\n' ], [ 'line', 'ok 38 should be equal\n' ], [ 'assert', { ok: true, id: 37, name: 'should be equal' } ], + [ 'comment', '# test for gc using --expose-gc\n' ], [ 'line', '# cleanup\n' ], - [ 'comment', '# cleanup\n' ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 39 test/expose-gc-test.js\n' ], [ 'assert', { ok: true, id: 38, name: 'should be equal' } ], + [ 'comment', '# cleanup\n' ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# global-harness-async.js\n' ], - [ 'comment', '# global-harness-async.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# outer\n' ], - [ 'comment', '# outer\n' ], [ 'line', '# inner 1\n' ], - [ 'comment', '# inner 1\n' ], [ 'line', 'ok 40 1-1\n' ], [ 'assert', { ok: true, id: 39, name: 'test/expose-gc-test.js' } ], + [ 'comment', '# global-harness-async.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# outer\n' ], + [ 'comment', '# inner 1\n' ], [ 'line', '# inner 2\n' ], - [ 'comment', '# inner 2\n' ], [ 'line', 'ok 41 2-1\n' ], [ 'assert', { ok: true, id: 40, name: '1-1' } ], + [ 'comment', '# inner 2\n' ], [ 'line', '# inner 3\n' ], - [ 'comment', '# inner 3\n' ], [ 'line', 'ok 42 3-1\n' ], [ 'assert', { ok: true, id: 41, name: '2-1' } ], + [ 'comment', '# inner 3\n' ], [ 'line', 'ok 43 test/global-harness-async.js\n' ], [ 'assert', { ok: true, id: 42, name: '3-1' } ], [ 'line', '# independent-timeouts.js\n' ], - [ 'comment', '# independent-timeouts.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# finishes in time\n' ], - [ 'comment', '# finishes in time\n' ], [ 'line', '# finishes in time too\n' ], - [ 'comment', '# finishes in time too\n' ], [ 'line', '# tests 0\n' ], - [ 'comment', '# tests 0\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 44 test/independent-timeouts.js\n' ], [ 'assert', { ok: true, id: 43, name: 'test/global-harness-async.js' } ], + [ 'comment', '# independent-timeouts.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# finishes in time\n' ], + [ 'comment', '# finishes in time too\n' ], + [ 'comment', '# tests 0\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# isolated-conf-test.js\n' ], - [ 'comment', '# isolated-conf-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# one\n' ], - [ 'comment', '# one\n' ], [ 'line', 'ok 45 should be equal\n' ], [ 'assert', { ok: true, id: 44, name: 'test/independent-timeouts.js' } ], + [ 'comment', '# isolated-conf-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# one\n' ], [ 'line', 'ok 46 should be equal\n' ], [ 'assert', { ok: true, id: 45, name: 'should be equal' } ], [ 'line', '# two\n' ], - [ 'comment', '# two\n' ], [ 'line', 'ok 47 should be equal\n' ], [ 'assert', { ok: true, id: 46, name: 'should be equal' } ], + [ 'comment', '# two\n' ], [ 'line', 'ok 48 should be equal\n' ], [ 'assert', { ok: true, id: 47, name: 'should be equal' } ], [ 'line', '# tests 4\n' ], - [ 'comment', '# tests 4\n' ], [ 'line', '# pass 4\n' ], - [ 'comment', '# pass 4\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 49 test/isolated-conf-test.js\n' ], [ 'assert', { ok: true, id: 48, name: 'should be equal' } ], + [ 'comment', '# tests 4\n' ], + [ 'comment', '# pass 4\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# meta-test.js\n' ], - [ 'comment', '# meta-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# meta test\n' ], - [ 'comment', '# meta test\n' ], [ 'line', 'ok 50 sanity check\n' ], [ 'assert', { ok: true, id: 49, name: 'test/isolated-conf-test.js' } ], + [ 'comment', '# meta-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# meta test\n' ], [ 'line', 'ok 51 not ok\n' ], [ 'assert', { ok: true, id: 50, name: 'sanity check' } ], [ 'line', 'ok 52 total test count\n' ], @@ -318,119 +318,119 @@ module.exports = [ 'line', 'ok 59 test isa Harness\n' ], [ 'assert', { ok: true, id: 58, name: 'test isa Test' } ], [ 'line', '# tests 10\n' ], - [ 'comment', '# tests 10\n' ], [ 'line', '# pass 10\n' ], - [ 'comment', '# pass 10\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 60 test/meta-test.js\n' ], [ 'assert', { ok: true, id: 59, name: 'test isa Harness' } ], + [ 'comment', '# tests 10\n' ], + [ 'comment', '# pass 10\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# nested-async.js\n' ], - [ 'comment', '# nested-async.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# Harness async test support\n' ], - [ 'comment', '# Harness async test support\n' ], [ 'line', 'ok 61 sync child A\n' ], [ 'assert', { ok: true, id: 60, name: 'test/meta-test.js' } ], + [ 'comment', '# nested-async.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# Harness async test support\n' ], [ 'line', '# sync child B\n' ], - [ 'comment', '# sync child B\n' ], [ 'line', '# async grandchild A\n' ], - [ 'comment', '# async grandchild A\n' ], [ 'line', 'ok 62 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 61, name: 'sync child A' } ], + [ 'comment', '# sync child B\n' ], + [ 'comment', '# async grandchild A\n' ], [ 'line', '# async grandchild B\n' ], - [ 'comment', '# async grandchild B\n' ], [ 'line', 'ok 63 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 62, name: '(unnamed assert)' } ], + [ 'comment', '# async grandchild B\n' ], [ 'line', '# async child\n' ], - [ 'comment', '# async child\n' ], [ 'line', 'ok 64 sync grandchild in async child A\n' ], [ 'assert', { ok: true, id: 63, name: '(unnamed assert)' } ], + [ 'comment', '# async child\n' ], [ 'line', '# sync grandchild in async child B\n' ], - [ 'comment', '# sync grandchild in async child B\n' ], [ 'line', 'ok 65 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 64, name: 'sync grandchild in async child A' } ], + [ 'comment', '# sync grandchild in async child B\n' ], [ 'line', '# tests 5\n' ], - [ 'comment', '# tests 5\n' ], [ 'line', '# pass 5\n' ], - [ 'comment', '# pass 5\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 66 test/nested-async.js\n' ], [ 'assert', { ok: true, id: 65, name: '(unnamed assert)' } ], + [ 'comment', '# tests 5\n' ], + [ 'comment', '# pass 5\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# nested-test.js\n' ], - [ 'comment', '# nested-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# parent\n' ], - [ 'comment', '# parent\n' ], [ 'line', 'ok 67 p test\n' ], [ 'assert', { ok: true, id: 66, name: 'test/nested-async.js' } ], + [ 'comment', '# nested-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# parent\n' ], [ 'line', '# subtest\n' ], - [ 'comment', '# subtest\n' ], [ 'line', 'ok 68 ch test\n' ], [ 'assert', { ok: true, id: 67, name: 'p test' } ], + [ 'comment', '# subtest\n' ], [ 'line', '# nested subtest\n' ], - [ 'comment', '# nested subtest\n' ], [ 'line', 'ok 69 grch test\n' ], [ 'assert', { ok: true, id: 68, name: 'ch test' } ], + [ 'comment', '# nested subtest\n' ], [ 'line', '# another subtest\n' ], - [ 'comment', '# another subtest\n' ], [ 'line', 'ok 70 ch test 2\n' ], [ 'assert', { ok: true, id: 69, name: 'grch test' } ], + [ 'comment', '# another subtest\n' ], [ 'line', '# tests 4\n' ], - [ 'comment', '# tests 4\n' ], [ 'line', '# pass 4\n' ], - [ 'comment', '# pass 4\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 71 test/nested-test.js\n' ], [ 'assert', { ok: true, id: 70, name: 'ch test 2' } ], + [ 'comment', '# tests 4\n' ], + [ 'comment', '# pass 4\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# non-tap-output.js\n' ], - [ 'comment', '# non-tap-output.js\n' ], [ 'line', '# everything is fine\n' ], - [ 'comment', '# everything is fine\n' ], [ 'line', '# there are no errors\n' ], - [ 'comment', '# there are no errors\n' ], [ 'line', '# this output is not haiku.\n' ], - [ 'comment', '# this output is not haiku.\n' ], [ 'line', '# is 8 ok?\n' ], - [ 'comment', '# is 8 ok?\n' ], [ 'line', 'ok 72 , 8 can stay.\n' ], [ 'assert', { ok: true, id: 71, name: 'test/nested-test.js' } ], + [ 'comment', '# non-tap-output.js\n' ], + [ 'comment', '# everything is fine\n' ], + [ 'comment', '# there are no errors\n' ], + [ 'comment', '# this output is not haiku.\n' ], + [ 'comment', '# is 8 ok?\n' ], [ 'line', '# but: nevertheless, here we are\n' ], - [ 'comment', '# but: nevertheless, here we are\n' ], [ 'line', '# this: is indented\n' ], - [ 'comment', '# this: is indented\n' ], [ 'line', '# and: it\n' ], - [ 'comment', '# and: it\n' ], [ 'line', '# might: ~\n' ], - [ 'comment', '# might: ~\n' ], [ 'line', '# be: yaml?\n' ], - [ 'comment', '# be: yaml?\n' ], [ 'line', 'ok 73 might be confusing\n' ], [ 'assert', { ok: true, id: 72, name: ', 8 can stay.' } ], + [ 'comment', '# but: nevertheless, here we are\n' ], + [ 'comment', '# this: is indented\n' ], + [ 'comment', '# and: it\n' ], + [ 'comment', '# might: ~\n' ], + [ 'comment', '# be: yaml?\n' ], [ 'line', 'ok 74 done now, exiting\n' ], [ 'assert', { ok: true, id: 73, name: 'might be confusing' } ], [ 'line', 'ok 75 test/non-tap-output.js\n' ], [ 'assert', { ok: true, id: 74, name: 'done now, exiting' } ], [ 'line', '# not-executed.sh\n' ], - [ 'comment', '# not-executed.sh\n' ], [ 'line', '# output-childtest-description.js\n' ], - [ 'comment', '# output-childtest-description.js\n' ], [ 'line', '# /Users/isaacs/dev/js/tap/test/nested-tests-fixture.js\n' ], - [ 'comment', - '# /Users/isaacs/dev/js/tap/test/nested-tests-fixture.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# nested tests, parent and child pass\n' ], - [ 'comment', '# nested tests, parent and child pass\n' ], [ 'line', 'ok 76 outputs parent description\n' ], [ 'assert', { ok: true, id: 75, name: 'test/non-tap-output.js' } ], + [ 'comment', '# not-executed.sh\n' ], + [ 'comment', '# output-childtest-description.js\n' ], + [ 'comment', + '# /Users/isaacs/dev/js/tap/test/nested-tests-fixture.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# nested tests, parent and child pass\n' ], [ 'line', 'ok 77 outputs child description\n' ], [ 'assert', { ok: true, id: 76, name: 'outputs parent description' } ], @@ -451,49 +451,49 @@ module.exports = id: 79, name: 'outputs parent result before child description' } ], [ 'line', '# tests 5\n' ], - [ 'comment', '# tests 5\n' ], [ 'line', '# pass 5\n' ], - [ 'comment', '# pass 5\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 81 test/output-childtest-description.js\n' ], [ 'assert', { ok: true, id: 80, name: 'outputs child description before child result' } ], + [ 'comment', '# tests 5\n' ], + [ 'comment', '# pass 5\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# result-trap.js\n' ], - [ 'comment', '# result-trap.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# trap result\n' ], - [ 'comment', '# trap result\n' ], [ 'line', 'ok 82 should be equal\n' ], [ 'assert', { ok: true, id: 81, name: 'test/output-childtest-description.js' } ], + [ 'comment', '# result-trap.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# trap result\n' ], [ 'line', 'ok 83 should be equal\n' ], [ 'assert', { ok: true, id: 82, name: 'should be equal' } ], [ 'line', '# tests 2\n' ], - [ 'comment', '# tests 2\n' ], [ 'line', '# pass 2\n' ], - [ 'comment', '# pass 2\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 84 test/result-trap.js\n' ], [ 'assert', { ok: true, id: 83, name: 'should be equal' } ], + [ 'comment', '# tests 2\n' ], + [ 'comment', '# pass 2\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# segv.js\n' ], - [ 'comment', '# segv.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# setup\n' ], - [ 'comment', '# setup\n' ], [ 'line', 'ok 85 compiled seg faulter\n' ], [ 'assert', { ok: true, id: 84, name: 'test/result-trap.js' } ], + [ 'comment', '# segv.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# setup\n' ], [ 'line', '# segv\n' ], - [ 'comment', '# segv\n' ], [ 'line', 'ok 86 should be equivalent\n' ], [ 'assert', { ok: true, id: 85, name: 'compiled seg faulter' } ], + [ 'comment', '# segv\n' ], [ 'line', 'ok 87 should be equivalent\n' ], [ 'assert', { ok: true, id: 86, name: 'should be equivalent' } ], [ 'line', 'ok 88 should be equivalent\n' ], @@ -505,75 +505,75 @@ module.exports = [ 'line', 'ok 91 should be equal\n' ], [ 'assert', { ok: true, id: 90, name: 'should be equivalent' } ], [ 'line', '# cleanup\n' ], - [ 'comment', '# cleanup\n' ], [ 'line', 'ok 92 cleaned up\n' ], [ 'assert', { ok: true, id: 91, name: 'should be equal' } ], + [ 'comment', '# cleanup\n' ], [ 'line', '# tests 8\n' ], - [ 'comment', '# tests 8\n' ], [ 'line', '# pass 8\n' ], - [ 'comment', '# pass 8\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 93 test/segv.js\n' ], [ 'assert', { ok: true, id: 92, name: 'cleaned up' } ], + [ 'comment', '# tests 8\n' ], + [ 'comment', '# pass 8\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# simple-harness-test-with-plan.js\n' ], - [ 'comment', '# simple-harness-test-with-plan.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# trivial success\n' ], - [ 'comment', '# trivial success\n' ], [ 'line', 'ok 94 it works\n' ], [ 'assert', { ok: true, id: 93, name: 'test/segv.js' } ], + [ 'comment', '# simple-harness-test-with-plan.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# trivial success\n' ], [ 'line', '# two tests\n' ], - [ 'comment', '# two tests\n' ], [ 'line', 'ok 95 math should work\n' ], [ 'assert', { ok: true, id: 94, name: 'it works' } ], + [ 'comment', '# two tests\n' ], [ 'line', 'ok 96 false should not be ok\n' ], [ 'assert', { ok: true, id: 95, name: 'math should work' } ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 97 test/simple-harness-test-with-plan.js\n' ], [ 'assert', { ok: true, id: 96, name: 'false should not be ok' } ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# simple-harness-test.js\n' ], - [ 'comment', '# simple-harness-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# trivial success\n' ], - [ 'comment', '# trivial success\n' ], [ 'line', 'ok 98 it works\n' ], [ 'assert', { ok: true, id: 97, name: 'test/simple-harness-test-with-plan.js' } ], + [ 'comment', '# simple-harness-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# trivial success\n' ], [ 'line', '# two tests\n' ], - [ 'comment', '# two tests\n' ], [ 'line', 'ok 99 math should work\n' ], [ 'assert', { ok: true, id: 98, name: 'it works' } ], + [ 'comment', '# two tests\n' ], [ 'line', 'ok 100 false should not be ok\n' ], [ 'assert', { ok: true, id: 99, name: 'math should work' } ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 101 test/simple-harness-test.js\n' ], [ 'assert', { ok: true, id: 100, name: 'false should not be ok' } ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# test-assert-todo-skip.js\n' ], - [ 'comment', '# test-assert-todo-skip.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# not much\n' ], - [ 'comment', '# not much\n' ], [ 'line', 'ok 102 always passes # SKIP skip it good\n' ], [ 'assert', { ok: true, id: 101, name: 'test/simple-harness-test.js' } ], + [ 'comment', '# test-assert-todo-skip.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# not much\n' ], [ 'line', 'ok 103 false # SKIP always fails\n' ], [ 'assert', { ok: true, id: 102, skip: 'skip it good', name: 'always passes' } ], @@ -608,26 +608,26 @@ module.exports = todo: true, name: 'bonus without explanation' } ], [ 'line', '# tests 8\n' ], - [ 'comment', '# tests 8\n' ], [ 'line', '# skip 4\n' ], - [ 'comment', '# skip 4\n' ], [ 'line', '# todo 4\n' ], - [ 'comment', '# todo 4\n' ], [ 'line', 'ok 110 test/test-assert-todo-skip.js\n' ], [ 'assert', { ok: true, id: 109, todo: true, name: 'expected without explanation' } ], + [ 'comment', '# tests 8\n' ], + [ 'comment', '# skip 4\n' ], + [ 'comment', '# todo 4\n' ], [ 'line', '# test-descriptions.js\n' ], - [ 'comment', '# test-descriptions.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# captures test descriptions\n' ], - [ 'comment', '# captures test descriptions\n' ], [ 'line', 'ok 111 exit cleanly\n' ], [ 'assert', { ok: true, id: 110, name: 'test/test-assert-todo-skip.js' } ], + [ 'comment', '# test-descriptions.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# captures test descriptions\n' ], [ 'line', 'ok 112 captures SKIP description\n' ], [ 'assert', { ok: true, id: 111, name: 'exit cleanly' } ], [ 'line', 'ok 113 skip summary is not from file\n' ], @@ -896,10 +896,10 @@ module.exports = [ 'assert', { ok: true, id: 131, name: 'todo summary is not in TAP output' } ], [ 'line', '# raw TAP > TAP consumer > summary\n' ], - [ 'comment', '# raw TAP > TAP consumer > summary\n' ], [ 'line', 'ok 133 overall result is PASS\n' ], [ 'assert', { ok: true, id: 132, name: 'no ugly "undefined" in output' } ], + [ 'comment', '# raw TAP > TAP consumer > summary\n' ], [ 'line', 'ok 134 no SKIP in summary\n' ], [ 'assert', { ok: true, id: 133, name: 'overall result is PASS' } ], @@ -914,10 +914,10 @@ module.exports = [ 'assert', { ok: true, id: 137, name: 'todo summary is not in TAP output' } ], [ 'line', '# TAP producer via require("tap")\n' ], - [ 'comment', '# TAP producer via require("tap")\n' ], [ 'line', 'ok 139 overall result is PASS\n' ], [ 'assert', { ok: true, id: 138, name: 'no ugly "undefined" in output' } ], + [ 'comment', '# TAP producer via require("tap")\n' ], [ 'line', 'ok 140 captures ok SKIP\n' ], [ 'assert', { ok: true, id: 139, name: 'overall result is PASS' } ], @@ -938,39 +938,39 @@ module.exports = [ 'assert', { ok: true, id: 145, name: 'todo summary is not in TAP output' } ], [ 'line', '# tests 22\n' ], - [ 'comment', '# tests 22\n' ], [ 'line', '# pass 22\n' ], - [ 'comment', '# pass 22\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 147 test/test-directives.js\n' ], [ 'assert', { ok: true, id: 146, name: 'no ugly "undefined" in output' } ], + [ 'comment', '# tests 22\n' ], + [ 'comment', '# pass 22\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# test-skip.js\n' ], - [ 'comment', '# test-skip.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', 'ok 148 does not count as failure # SKIP \n' ], [ 'assert', { ok: true, id: 147, name: 'test/test-directives.js' } ], + [ 'comment', '# test-skip.js\n' ], + [ 'comment', '# TAP version 13\n' ], [ 'line', '# tests 1\n' ], - [ 'comment', '# tests 1\n' ], [ 'line', '# skip 1\n' ], - [ 'comment', '# skip 1\n' ], [ 'line', 'ok 149 test/test-skip.js\n' ], [ 'assert', { ok: true, id: 148, skip: true, name: 'does not count as failure' } ], + [ 'comment', '# tests 1\n' ], + [ 'comment', '# skip 1\n' ], [ 'line', '# test-test.js\n' ], - [ 'comment', '# test-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# testing the test object\n' ], - [ 'comment', '# testing the test object\n' ], [ 'line', 'ok 150 test object should be instanceof Test\n' ], [ 'assert', { ok: true, id: 149, name: 'test/test-skip.js' } ], + [ 'comment', '# test-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# testing the test object\n' ], [ 'line', 'ok 151 test object should be instanceof Harness\n' ], [ 'assert', { ok: true, @@ -1505,69 +1505,69 @@ module.exports = [ 'assert', { ok: true, id: 295, name: 'should have isa method' } ], [ 'line', '# tests 147\n' ], - [ 'comment', '# tests 147\n' ], [ 'line', '# pass 147\n' ], - [ 'comment', '# pass 147\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 297 test/test-test.js\n' ], [ 'assert', { ok: true, id: 296, name: 'isa method should be a function' } ], + [ 'comment', '# tests 147\n' ], + [ 'comment', '# pass 147\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# timeout.js\n' ], - [ 'comment', '# timeout.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# timeout test with plan only\n' ], - [ 'comment', '# timeout test with plan only\n' ], [ 'line', 'ok 298 a\n' ], [ 'assert', { ok: true, id: 297, name: 'test/test-test.js' } ], + [ 'comment', '# timeout.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# timeout test with plan only\n' ], [ 'line', 'ok 299 b\n' ], [ 'assert', { ok: true, id: 298, name: 'a' } ], [ 'line', '# timeout test with plan and end\n' ], - [ 'comment', '# timeout test with plan and end\n' ], [ 'line', 'ok 300 a\n' ], [ 'assert', { ok: true, id: 299, name: 'b' } ], + [ 'comment', '# timeout test with plan and end\n' ], [ 'line', 'ok 301 b\n' ], [ 'assert', { ok: true, id: 300, name: 'a' } ], [ 'line', '# tests 4\n' ], - [ 'comment', '# tests 4\n' ], [ 'line', '# pass 4\n' ], - [ 'comment', '# pass 4\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 302 test/timeout.js\n' ], [ 'assert', { ok: true, id: 301, name: 'b' } ], + [ 'comment', '# tests 4\n' ], + [ 'comment', '# pass 4\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# trivial-success.js\n' ], - [ 'comment', '# trivial-success.js\n' ], [ 'line', 'ok 303 test/trivial-success.js\n' ], [ 'assert', { ok: true, id: 302, name: 'test/timeout.js' } ], + [ 'comment', '# trivial-success.js\n' ], [ 'line', '# undefined_indented.js\n' ], - [ 'comment', '# undefined_indented.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# consume yaml\n' ], - [ 'comment', '# consume yaml\n' ], [ 'line', 'ok 304 should be equivalent\n' ], [ 'assert', { ok: true, id: 303, name: 'test/trivial-success.js' } ], + [ 'comment', '# undefined_indented.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# consume yaml\n' ], [ 'line', '# tests 1\n' ], - [ 'comment', '# tests 1\n' ], [ 'line', '# pass 1\n' ], - [ 'comment', '# pass 1\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 305 test/undefined_indented.js\n' ], [ 'assert', { ok: true, id: 304, name: 'should be equivalent' } ], + [ 'comment', '# tests 1\n' ], + [ 'comment', '# pass 1\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# valid-command.js\n' ], - [ 'comment', '# valid-command.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# valid command\n' ], - [ 'comment', '# valid command\n' ], [ 'line', 'ok 306 should be equivalent\n' ], [ 'assert', { ok: true, id: 305, name: 'test/undefined_indented.js' } ], + [ 'comment', '# valid-command.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# valid command\n' ], [ 'line', 'ok 307 should be equivalent\n' ], [ 'assert', { ok: true, id: 306, name: 'should be equivalent' } ], @@ -1584,13 +1584,13 @@ module.exports = [ 'assert', { ok: true, id: 310, name: 'should be equivalent' } ], [ 'line', '# tests 6\n' ], - [ 'comment', '# tests 6\n' ], [ 'line', '# pass 6\n' ], - [ 'comment', '# pass 6\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 312 test/valid-command.js\n' ], [ 'assert', { ok: true, id: 311, name: 'should be equal' } ], + [ 'comment', '# tests 6\n' ], + [ 'comment', '# pass 6\n' ], + [ 'comment', '# ok\n' ], [ 'line', '1..312\n' ], [ 'assert', { ok: true, id: 312, name: 'test/valid-command.js' } ], diff --git a/test/fixtures/tap-tests.js b/test/fixtures/tap-tests.js index e9b21df..cbab802 100644 --- a/test/fixtures/tap-tests.js +++ b/test/fixtures/tap-tests.js @@ -9,60 +9,59 @@ module.exports = [ 'comment', '# same buffers\n' ], [ 'line', 'ok 1 should be equivalent\n' ], [ 'line', '# not same buffers\n' ], - [ 'comment', '# not same buffers\n' ], [ 'line', 'ok 2 should not be equivalent\n' ], [ 'assert', { ok: true, id: 1, name: 'should be equivalent' } ], + [ 'comment', '# not same buffers\n' ], [ 'line', '# tests 2\n' ], - [ 'comment', '# tests 2\n' ], [ 'line', '# pass 2\n' ], - [ 'comment', '# pass 2\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 3 test/buffer_compare.js\n' ], [ 'assert', { ok: true, id: 2, name: 'should not be equivalent' } ], + [ 'comment', '# tests 2\n' ], + [ 'comment', '# pass 2\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# common.js\n' ], - [ 'comment', '# common.js\n' ], [ 'line', 'ok 4 just setup, nothing relevant\n' ], [ 'assert', { ok: true, id: 3, name: 'test/buffer_compare.js' } ], + [ 'comment', '# common.js\n' ], [ 'line', 'ok 5 test/common.js\n' ], [ 'assert', { ok: true, id: 4, name: 'just setup, nothing relevant' } ], [ 'line', '# consumer.js\n' ], - [ 'comment', '# consumer.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# basic.tap\n' ], - [ 'comment', '# basic.tap\n' ], [ 'line', 'ok 6 should be equivalent\n' ], [ 'assert', { ok: true, id: 5, name: 'test/common.js' } ], + [ 'comment', '# consumer.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# basic.tap\n' ], [ 'line', '# indent.tap\n' ], - [ 'comment', '# indent.tap\n' ], [ 'line', 'ok 7 should be equivalent\n' ], [ 'assert', { ok: true, id: 6, name: 'should be equivalent' } ], + [ 'comment', '# indent.tap\n' ], [ 'line', '# missing.tap\n' ], - [ 'comment', '# missing.tap\n' ], [ 'line', 'ok 8 should be equivalent\n' ], [ 'assert', { ok: true, id: 7, name: 'should be equivalent' } ], + [ 'comment', '# missing.tap\n' ], [ 'line', '# skip-all.tap\n' ], - [ 'comment', '# skip-all.tap\n' ], [ 'line', 'ok 9 should be equivalent\n' ], [ 'assert', { ok: true, id: 8, name: 'should be equivalent' } ], + [ 'comment', '# skip-all.tap\n' ], [ 'line', '# yamlish.tap\n' ], - [ 'comment', '# yamlish.tap\n' ], [ 'line', 'ok 10 should be equivalent\n' ], [ 'assert', { ok: true, id: 9, name: 'should be equivalent' } ], + [ 'comment', '# yamlish.tap\n' ], [ 'line', '# tests 5\n' ], - [ 'comment', '# tests 5\n' ], [ 'line', '# pass 5\n' ], - [ 'comment', '# pass 5\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 11 test/consumer.js\n' ], [ 'assert', { ok: true, id: 10, name: 'should be equivalent' } ], + [ 'comment', '# tests 5\n' ], + [ 'comment', '# pass 5\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# debug-test.js\n' ], - [ 'comment', '# debug-test.js\n' ], [ 'line', 'debug test\n' ], [ 'extra', 'debug test\n' ], [ 'line', 't.plan=1\n' ], @@ -70,141 +69,141 @@ module.exports = [ 'line', '\'Debugger listening on port 5858\\n\'\n' ], [ 'extra', '\'Debugger listening on port 5858\\n\'\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# debug test\n' ], - [ 'comment', '# debug test\n' ], [ 'line', 'ok 12 Should output debugger message\n' ], [ 'assert', { ok: true, id: 11, name: 'test/consumer.js' } ], + [ 'comment', '# debug-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# debug test\n' ], [ 'line', '# tests 1\n' ], - [ 'comment', '# tests 1\n' ], [ 'line', '# pass 1\n' ], - [ 'comment', '# pass 1\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 13 test/debug-test.js\n' ], [ 'assert', { ok: true, id: 12, name: 'Should output debugger message' } ], + [ 'comment', '# tests 1\n' ], + [ 'comment', '# pass 1\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# deep-strict.js\n' ], - [ 'comment', '# deep-strict.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# strictDeepEquals shouldn\'t care about key order\n' ], - [ 'comment', - '# strictDeepEquals shouldn\'t care about key order\n' ], [ 'line', 'ok 14 should be strictly equal\n' ], [ 'assert', { ok: true, id: 13, name: 'test/debug-test.js' } ], - [ 'line', - '# strictDeepEquals shouldn\'t care about key order recursively\n' ], + [ 'comment', '# deep-strict.js\n' ], + [ 'comment', '# TAP version 13\n' ], [ 'comment', + '# strictDeepEquals shouldn\'t care about key order\n' ], + [ 'line', '# strictDeepEquals shouldn\'t care about key order recursively\n' ], [ 'line', 'ok 15 should be strictly equal\n' ], [ 'assert', { ok: true, id: 14, name: 'should be strictly equal' } ], - [ 'line', - '# strictDeepEquals shoudn\'t care about key order (but still might)\n' ], [ 'comment', + '# strictDeepEquals shouldn\'t care about key order recursively\n' ], + [ 'line', '# strictDeepEquals shoudn\'t care about key order (but still might)\n' ], [ 'line', 'ok 16 should be strictly equal\n' ], [ 'assert', { ok: true, id: 15, name: 'should be strictly equal' } ], + [ 'comment', + '# strictDeepEquals shoudn\'t care about key order (but still might)\n' ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 17 test/deep-strict.js\n' ], [ 'assert', { ok: true, id: 16, name: 'should be strictly equal' } ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# deep.js\n' ], - [ 'comment', '# deep.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# deepEquals shouldn\'t care about key order and types\n' ], - [ 'comment', - '# deepEquals shouldn\'t care about key order and types\n' ], [ 'line', 'ok 18 should be equivalent\n' ], [ 'assert', { ok: true, id: 17, name: 'test/deep-strict.js' } ], - [ 'line', - '# deepEquals shouldn\'t care about key order recursively and types\n' ], + [ 'comment', '# deep.js\n' ], + [ 'comment', '# TAP version 13\n' ], [ 'comment', + '# deepEquals shouldn\'t care about key order and types\n' ], + [ 'line', '# deepEquals shouldn\'t care about key order recursively and types\n' ], [ 'line', 'ok 19 should be equivalent\n' ], [ 'assert', { ok: true, id: 18, name: 'should be equivalent' } ], - [ 'line', - '# deepEquals shoudn\'t care about key order (but still might) and types\n' ], [ 'comment', + '# deepEquals shouldn\'t care about key order recursively and types\n' ], + [ 'line', '# deepEquals shoudn\'t care about key order (but still might) and types\n' ], [ 'line', 'ok 20 should be equivalent\n' ], [ 'assert', { ok: true, id: 19, name: 'should be equivalent' } ], + [ 'comment', + '# deepEquals shoudn\'t care about key order (but still might) and types\n' ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 21 test/deep.js\n' ], [ 'assert', { ok: true, id: 20, name: 'should be equivalent' } ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# executed.sh\n' ], - [ 'comment', '# executed.sh\n' ], [ 'line', 'ok 22 File with executable bit should be executed\n' ], [ 'assert', { ok: true, id: 21, name: 'test/deep.js' } ], + [ 'comment', '# executed.sh\n' ], [ 'line', 'ok 23 test/executed.sh\n' ], [ 'assert', { ok: true, id: 22, name: 'File with executable bit should be executed' } ], [ 'line', '# exit-code.js\n' ], - [ 'comment', '# exit-code.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# exit code 1 when tap results show failure\n' ], - [ 'comment', '# exit code 1 when tap results show failure\n' ], [ 'line', '# test exits 0, has failures\n' ], - [ 'comment', '# test exits 0, has failures\n' ], [ 'line', 'ok 24 should be equal\n' ], [ 'assert', { ok: true, id: 23, name: 'test/executed.sh' } ], + [ 'comment', '# exit-code.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# exit code 1 when tap results show failure\n' ], + [ 'comment', '# test exits 0, has failures\n' ], [ 'line', 'ok 25 should be equal\n' ], [ 'assert', { ok: true, id: 24, name: 'should be equal' } ], [ 'line', '# test exits 1, has failures\n' ], - [ 'comment', '# test exits 1, has failures\n' ], [ 'line', 'ok 26 should be equal\n' ], [ 'assert', { ok: true, id: 25, name: 'should be equal' } ], + [ 'comment', '# test exits 1, has failures\n' ], [ 'line', 'ok 27 should be equal\n' ], [ 'assert', { ok: true, id: 26, name: 'should be equal' } ], [ 'line', '# test exits 1, has no failures\n' ], - [ 'comment', '# test exits 1, has no failures\n' ], [ 'line', 'ok 28 should be equal\n' ], [ 'assert', { ok: true, id: 27, name: 'should be equal' } ], + [ 'comment', '# test exits 1, has no failures\n' ], [ 'line', 'ok 29 should be equal\n' ], [ 'assert', { ok: true, id: 28, name: 'should be equal' } ], [ 'line', '# successes exit 0\n' ], - [ 'comment', '# successes exit 0\n' ], [ 'line', '# test that does nothing, but exits 0\n' ], - [ 'comment', '# test that does nothing, but exits 0\n' ], [ 'line', 'ok 30 should be equal\n' ], [ 'assert', { ok: true, id: 29, name: 'should be equal' } ], + [ 'comment', '# successes exit 0\n' ], + [ 'comment', '# test that does nothing, but exits 0\n' ], [ 'line', 'ok 31 should be equal\n' ], [ 'assert', { ok: true, id: 30, name: 'should be equal' } ], [ 'line', '# test that succeeds, and exits 0\n' ], - [ 'comment', '# test that succeeds, and exits 0\n' ], [ 'line', 'ok 32 should be equal\n' ], [ 'assert', { ok: true, id: 31, name: 'should be equal' } ], + [ 'comment', '# test that succeeds, and exits 0\n' ], [ 'line', 'ok 33 should be equal\n' ], [ 'assert', { ok: true, id: 32, name: 'should be equal' } ], [ 'line', '# tests 10\n' ], - [ 'comment', '# tests 10\n' ], [ 'line', '# pass 10\n' ], - [ 'comment', '# pass 10\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 34 test/exit-code.js\n' ], [ 'assert', { ok: true, id: 33, name: 'should be equal' } ], + [ 'comment', '# tests 10\n' ], + [ 'comment', '# pass 10\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# expose-gc-test.js\n' ], - [ 'comment', '# expose-gc-test.js\n' ], [ 'line', 'gc test\n' ], [ 'extra', 'gc test\n' ], [ 'line', 't.plan=1\n' ], @@ -212,9 +211,7 @@ module.exports = [ 'line', 'assert gc does not exist\n' ], [ 'extra', 'assert gc does not exist\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# gc test when the gc isn\'t there\n' ], - [ 'comment', '# gc test when the gc isn\'t there\n' ], [ 'line', 'gc test\n' ], [ 'extra', 'gc test\n' ], [ 'line', 't.plan=2\n' ], @@ -233,96 +230,99 @@ module.exports = [ 'extra', 'assert gc exists\n' ], [ 'line', 'ok 35 should be equal\n' ], [ 'assert', { ok: true, id: 34, name: 'test/exit-code.js' } ], + [ 'comment', '# expose-gc-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# gc test when the gc isn\'t there\n' ], [ 'line', '# gc test when the gc should be there\n' ], - [ 'comment', '# gc test when the gc should be there\n' ], [ 'line', '# test for gc using --gc\n' ], - [ 'comment', '# test for gc using --gc\n' ], [ 'line', 'ok 36 should be equal\n' ], [ 'assert', { ok: true, id: 35, name: 'should be equal' } ], + [ 'comment', '# gc test when the gc should be there\n' ], + [ 'comment', '# test for gc using --gc\n' ], [ 'line', '# test for gc using --expose-gc\n' ], - [ 'comment', '# test for gc using --expose-gc\n' ], [ 'line', 'ok 37 should be equal\n' ], [ 'assert', { ok: true, id: 36, name: 'should be equal' } ], + [ 'comment', '# test for gc using --expose-gc\n' ], [ 'line', '# cleanup\n' ], - [ 'comment', '# cleanup\n' ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 38 test/expose-gc-test.js\n' ], [ 'assert', { ok: true, id: 37, name: 'should be equal' } ], + [ 'comment', '# cleanup\n' ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# global-harness-async.js\n' ], - [ 'comment', '# global-harness-async.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# outer\n' ], - [ 'comment', '# outer\n' ], [ 'line', '# inner 1\n' ], - [ 'comment', '# inner 1\n' ], [ 'line', 'ok 39 1-1\n' ], [ 'assert', { ok: true, id: 38, name: 'test/expose-gc-test.js' } ], + [ 'comment', '# global-harness-async.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# outer\n' ], + [ 'comment', '# inner 1\n' ], [ 'line', '# inner 2\n' ], - [ 'comment', '# inner 2\n' ], [ 'line', 'ok 40 2-1\n' ], [ 'assert', { ok: true, id: 39, name: '1-1' } ], + [ 'comment', '# inner 2\n' ], [ 'line', '# inner 3\n' ], - [ 'comment', '# inner 3\n' ], [ 'line', 'ok 41 3-1\n' ], [ 'assert', { ok: true, id: 40, name: '2-1' } ], + [ 'comment', '# inner 3\n' ], [ 'line', 'ok 42 test/global-harness-async.js\n' ], [ 'assert', { ok: true, id: 41, name: '3-1' } ], [ 'line', '# independent-timeouts.js\n' ], - [ 'comment', '# independent-timeouts.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# finishes in time\n' ], - [ 'comment', '# finishes in time\n' ], [ 'line', '# finishes in time too\n' ], - [ 'comment', '# finishes in time too\n' ], [ 'line', '# tests 0\n' ], - [ 'comment', '# tests 0\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 43 test/independent-timeouts.js\n' ], [ 'assert', { ok: true, id: 42, name: 'test/global-harness-async.js' } ], + [ 'comment', '# independent-timeouts.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# finishes in time\n' ], + [ 'comment', '# finishes in time too\n' ], + [ 'comment', '# tests 0\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# isolated-conf-test.js\n' ], - [ 'comment', '# isolated-conf-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# one\n' ], - [ 'comment', '# one\n' ], [ 'line', 'ok 44 should be equal\n' ], [ 'assert', { ok: true, id: 43, name: 'test/independent-timeouts.js' } ], + [ 'comment', '# isolated-conf-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# one\n' ], [ 'line', 'ok 45 should be equal\n' ], [ 'assert', { ok: true, id: 44, name: 'should be equal' } ], [ 'line', '# two\n' ], - [ 'comment', '# two\n' ], [ 'line', 'ok 46 should be equal\n' ], [ 'assert', { ok: true, id: 45, name: 'should be equal' } ], + [ 'comment', '# two\n' ], [ 'line', 'ok 47 should be equal\n' ], [ 'assert', { ok: true, id: 46, name: 'should be equal' } ], [ 'line', '# tests 4\n' ], - [ 'comment', '# tests 4\n' ], [ 'line', '# pass 4\n' ], - [ 'comment', '# pass 4\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 48 test/isolated-conf-test.js\n' ], [ 'assert', { ok: true, id: 47, name: 'should be equal' } ], + [ 'comment', '# tests 4\n' ], + [ 'comment', '# pass 4\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# meta-test.js\n' ], - [ 'comment', '# meta-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# meta test\n' ], - [ 'comment', '# meta test\n' ], [ 'line', 'ok 49 sanity check\n' ], [ 'assert', { ok: true, id: 48, name: 'test/isolated-conf-test.js' } ], + [ 'comment', '# meta-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# meta test\n' ], [ 'line', 'ok 50 not ok\n' ], [ 'assert', { ok: true, id: 49, name: 'sanity check' } ], [ 'line', 'ok 51 total test count\n' ], @@ -342,119 +342,119 @@ module.exports = [ 'line', 'ok 58 test isa Harness\n' ], [ 'assert', { ok: true, id: 57, name: 'test isa Test' } ], [ 'line', '# tests 10\n' ], - [ 'comment', '# tests 10\n' ], [ 'line', '# pass 10\n' ], - [ 'comment', '# pass 10\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 59 test/meta-test.js\n' ], [ 'assert', { ok: true, id: 58, name: 'test isa Harness' } ], + [ 'comment', '# tests 10\n' ], + [ 'comment', '# pass 10\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# nested-async.js\n' ], - [ 'comment', '# nested-async.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# Harness async test support\n' ], - [ 'comment', '# Harness async test support\n' ], [ 'line', 'ok 60 sync child A\n' ], [ 'assert', { ok: true, id: 59, name: 'test/meta-test.js' } ], + [ 'comment', '# nested-async.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# Harness async test support\n' ], [ 'line', '# sync child B\n' ], - [ 'comment', '# sync child B\n' ], [ 'line', '# async grandchild A\n' ], - [ 'comment', '# async grandchild A\n' ], [ 'line', 'ok 61 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 60, name: 'sync child A' } ], + [ 'comment', '# sync child B\n' ], + [ 'comment', '# async grandchild A\n' ], [ 'line', '# async grandchild B\n' ], - [ 'comment', '# async grandchild B\n' ], [ 'line', 'ok 62 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 61, name: '(unnamed assert)' } ], + [ 'comment', '# async grandchild B\n' ], [ 'line', '# async child\n' ], - [ 'comment', '# async child\n' ], [ 'line', 'ok 63 sync grandchild in async child A\n' ], [ 'assert', { ok: true, id: 62, name: '(unnamed assert)' } ], + [ 'comment', '# async child\n' ], [ 'line', '# sync grandchild in async child B\n' ], - [ 'comment', '# sync grandchild in async child B\n' ], [ 'line', 'ok 64 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 63, name: 'sync grandchild in async child A' } ], + [ 'comment', '# sync grandchild in async child B\n' ], [ 'line', '# tests 5\n' ], - [ 'comment', '# tests 5\n' ], [ 'line', '# pass 5\n' ], - [ 'comment', '# pass 5\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 65 test/nested-async.js\n' ], [ 'assert', { ok: true, id: 64, name: '(unnamed assert)' } ], + [ 'comment', '# tests 5\n' ], + [ 'comment', '# pass 5\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# nested-test.js\n' ], - [ 'comment', '# nested-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# parent\n' ], - [ 'comment', '# parent\n' ], [ 'line', 'ok 66 p test\n' ], [ 'assert', { ok: true, id: 65, name: 'test/nested-async.js' } ], + [ 'comment', '# nested-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# parent\n' ], [ 'line', '# subtest\n' ], - [ 'comment', '# subtest\n' ], [ 'line', 'ok 67 ch test\n' ], [ 'assert', { ok: true, id: 66, name: 'p test' } ], + [ 'comment', '# subtest\n' ], [ 'line', '# nested subtest\n' ], - [ 'comment', '# nested subtest\n' ], [ 'line', 'ok 68 grch test\n' ], [ 'assert', { ok: true, id: 67, name: 'ch test' } ], + [ 'comment', '# nested subtest\n' ], [ 'line', '# another subtest\n' ], - [ 'comment', '# another subtest\n' ], [ 'line', 'ok 69 ch test 2\n' ], [ 'assert', { ok: true, id: 68, name: 'grch test' } ], + [ 'comment', '# another subtest\n' ], [ 'line', '# tests 4\n' ], - [ 'comment', '# tests 4\n' ], [ 'line', '# pass 4\n' ], - [ 'comment', '# pass 4\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 70 test/nested-test.js\n' ], [ 'assert', { ok: true, id: 69, name: 'ch test 2' } ], + [ 'comment', '# tests 4\n' ], + [ 'comment', '# pass 4\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# non-tap-output.js\n' ], - [ 'comment', '# non-tap-output.js\n' ], [ 'line', '# everything is fine\n' ], - [ 'comment', '# everything is fine\n' ], [ 'line', '# there are no errors\n' ], - [ 'comment', '# there are no errors\n' ], [ 'line', '# this output is not haiku.\n' ], - [ 'comment', '# this output is not haiku.\n' ], [ 'line', '# is 8 ok?\n' ], - [ 'comment', '# is 8 ok?\n' ], [ 'line', 'ok 71 , 8 can stay.\n' ], [ 'assert', { ok: true, id: 70, name: 'test/nested-test.js' } ], + [ 'comment', '# non-tap-output.js\n' ], + [ 'comment', '# everything is fine\n' ], + [ 'comment', '# there are no errors\n' ], + [ 'comment', '# this output is not haiku.\n' ], + [ 'comment', '# is 8 ok?\n' ], [ 'line', '# but: nevertheless, here we are\n' ], - [ 'comment', '# but: nevertheless, here we are\n' ], [ 'line', '# this: is indented\n' ], - [ 'comment', '# this: is indented\n' ], [ 'line', '# and: it\n' ], - [ 'comment', '# and: it\n' ], [ 'line', '# might: ~\n' ], - [ 'comment', '# might: ~\n' ], [ 'line', '# be: yaml?\n' ], - [ 'comment', '# be: yaml?\n' ], [ 'line', 'ok 72 might be confusing\n' ], [ 'assert', { ok: true, id: 71, name: ', 8 can stay.' } ], + [ 'comment', '# but: nevertheless, here we are\n' ], + [ 'comment', '# this: is indented\n' ], + [ 'comment', '# and: it\n' ], + [ 'comment', '# might: ~\n' ], + [ 'comment', '# be: yaml?\n' ], [ 'line', 'ok 73 done now, exiting\n' ], [ 'assert', { ok: true, id: 72, name: 'might be confusing' } ], [ 'line', 'ok 74 test/non-tap-output.js\n' ], [ 'assert', { ok: true, id: 73, name: 'done now, exiting' } ], [ 'line', '# not-executed.sh\n' ], - [ 'comment', '# not-executed.sh\n' ], [ 'line', '# output-childtest-description.js\n' ], - [ 'comment', '# output-childtest-description.js\n' ], [ 'line', '# /Users/isaacs/dev/js/tap/test/nested-tests-fixture.js\n' ], - [ 'comment', - '# /Users/isaacs/dev/js/tap/test/nested-tests-fixture.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# nested tests, parent and child pass\n' ], - [ 'comment', '# nested tests, parent and child pass\n' ], [ 'line', 'ok 75 outputs parent description\n' ], [ 'assert', { ok: true, id: 74, name: 'test/non-tap-output.js' } ], + [ 'comment', '# not-executed.sh\n' ], + [ 'comment', '# output-childtest-description.js\n' ], + [ 'comment', + '# /Users/isaacs/dev/js/tap/test/nested-tests-fixture.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# nested tests, parent and child pass\n' ], [ 'line', 'ok 76 outputs child description\n' ], [ 'assert', { ok: true, id: 75, name: 'outputs parent description' } ], @@ -475,49 +475,49 @@ module.exports = id: 78, name: 'outputs parent result before child description' } ], [ 'line', '# tests 5\n' ], - [ 'comment', '# tests 5\n' ], [ 'line', '# pass 5\n' ], - [ 'comment', '# pass 5\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 80 test/output-childtest-description.js\n' ], [ 'assert', { ok: true, id: 79, name: 'outputs child description before child result' } ], + [ 'comment', '# tests 5\n' ], + [ 'comment', '# pass 5\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# result-trap.js\n' ], - [ 'comment', '# result-trap.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# trap result\n' ], - [ 'comment', '# trap result\n' ], [ 'line', 'ok 81 should be equal\n' ], [ 'assert', { ok: true, id: 80, name: 'test/output-childtest-description.js' } ], + [ 'comment', '# result-trap.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# trap result\n' ], [ 'line', 'ok 82 should be equal\n' ], [ 'assert', { ok: true, id: 81, name: 'should be equal' } ], [ 'line', '# tests 2\n' ], - [ 'comment', '# tests 2\n' ], [ 'line', '# pass 2\n' ], - [ 'comment', '# pass 2\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 83 test/result-trap.js\n' ], [ 'assert', { ok: true, id: 82, name: 'should be equal' } ], + [ 'comment', '# tests 2\n' ], + [ 'comment', '# pass 2\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# segv.js\n' ], - [ 'comment', '# segv.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# setup\n' ], - [ 'comment', '# setup\n' ], [ 'line', 'ok 84 compiled seg faulter\n' ], [ 'assert', { ok: true, id: 83, name: 'test/result-trap.js' } ], + [ 'comment', '# segv.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# setup\n' ], [ 'line', '# segv\n' ], - [ 'comment', '# segv\n' ], [ 'line', 'ok 85 should be equivalent\n' ], [ 'assert', { ok: true, id: 84, name: 'compiled seg faulter' } ], + [ 'comment', '# segv\n' ], [ 'line', 'ok 86 should be equivalent\n' ], [ 'assert', { ok: true, id: 85, name: 'should be equivalent' } ], [ 'line', 'ok 87 should be equivalent\n' ], @@ -529,75 +529,75 @@ module.exports = [ 'line', 'ok 90 should be equal\n' ], [ 'assert', { ok: true, id: 89, name: 'should be equivalent' } ], [ 'line', '# cleanup\n' ], - [ 'comment', '# cleanup\n' ], [ 'line', 'ok 91 cleaned up\n' ], [ 'assert', { ok: true, id: 90, name: 'should be equal' } ], + [ 'comment', '# cleanup\n' ], [ 'line', '# tests 8\n' ], - [ 'comment', '# tests 8\n' ], [ 'line', '# pass 8\n' ], - [ 'comment', '# pass 8\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 92 test/segv.js\n' ], [ 'assert', { ok: true, id: 91, name: 'cleaned up' } ], + [ 'comment', '# tests 8\n' ], + [ 'comment', '# pass 8\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# simple-harness-test-with-plan.js\n' ], - [ 'comment', '# simple-harness-test-with-plan.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# trivial success\n' ], - [ 'comment', '# trivial success\n' ], [ 'line', 'ok 93 it works\n' ], [ 'assert', { ok: true, id: 92, name: 'test/segv.js' } ], + [ 'comment', '# simple-harness-test-with-plan.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# trivial success\n' ], [ 'line', '# two tests\n' ], - [ 'comment', '# two tests\n' ], [ 'line', 'ok 94 math should work\n' ], [ 'assert', { ok: true, id: 93, name: 'it works' } ], + [ 'comment', '# two tests\n' ], [ 'line', 'ok 95 false should not be ok\n' ], [ 'assert', { ok: true, id: 94, name: 'math should work' } ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 96 test/simple-harness-test-with-plan.js\n' ], [ 'assert', { ok: true, id: 95, name: 'false should not be ok' } ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# simple-harness-test.js\n' ], - [ 'comment', '# simple-harness-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# trivial success\n' ], - [ 'comment', '# trivial success\n' ], [ 'line', 'ok 97 it works\n' ], [ 'assert', { ok: true, id: 96, name: 'test/simple-harness-test-with-plan.js' } ], + [ 'comment', '# simple-harness-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# trivial success\n' ], [ 'line', '# two tests\n' ], - [ 'comment', '# two tests\n' ], [ 'line', 'ok 98 math should work\n' ], [ 'assert', { ok: true, id: 97, name: 'it works' } ], + [ 'comment', '# two tests\n' ], [ 'line', 'ok 99 false should not be ok\n' ], [ 'assert', { ok: true, id: 98, name: 'math should work' } ], [ 'line', '# tests 3\n' ], - [ 'comment', '# tests 3\n' ], [ 'line', '# pass 3\n' ], - [ 'comment', '# pass 3\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 100 test/simple-harness-test.js\n' ], [ 'assert', { ok: true, id: 99, name: 'false should not be ok' } ], + [ 'comment', '# tests 3\n' ], + [ 'comment', '# pass 3\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# test-assert-todo-skip.js\n' ], - [ 'comment', '# test-assert-todo-skip.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# not much\n' ], - [ 'comment', '# not much\n' ], [ 'line', 'ok 101 always passes # SKIP skip it good\n' ], [ 'assert', { ok: true, id: 100, name: 'test/simple-harness-test.js' } ], + [ 'comment', '# test-assert-todo-skip.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# not much\n' ], [ 'line', 'ok 102 false # SKIP always fails\n' ], [ 'assert', { ok: true, id: 101, skip: 'skip it good', name: 'always passes' } ], @@ -632,26 +632,26 @@ module.exports = todo: true, name: 'bonus without explanation' } ], [ 'line', '# tests 8\n' ], - [ 'comment', '# tests 8\n' ], [ 'line', '# skip 4\n' ], - [ 'comment', '# skip 4\n' ], [ 'line', '# todo 4\n' ], - [ 'comment', '# todo 4\n' ], [ 'line', 'ok 109 test/test-assert-todo-skip.js\n' ], [ 'assert', { ok: true, id: 108, todo: true, name: 'expected without explanation' } ], + [ 'comment', '# tests 8\n' ], + [ 'comment', '# skip 4\n' ], + [ 'comment', '# todo 4\n' ], [ 'line', '# test-descriptions.js\n' ], - [ 'comment', '# test-descriptions.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# captures test descriptions\n' ], - [ 'comment', '# captures test descriptions\n' ], [ 'line', 'ok 110 exit cleanly\n' ], [ 'assert', { ok: true, id: 109, name: 'test/test-assert-todo-skip.js' } ], + [ 'comment', '# test-descriptions.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# captures test descriptions\n' ], [ 'line', 'ok 111 captures SKIP description\n' ], [ 'assert', { ok: true, id: 110, name: 'exit cleanly' } ], [ 'line', 'ok 112 skip summary is not from file\n' ], @@ -920,10 +920,10 @@ module.exports = [ 'assert', { ok: true, id: 130, name: 'todo summary is not in TAP output' } ], [ 'line', '# raw TAP > TAP consumer > summary\n' ], - [ 'comment', '# raw TAP > TAP consumer > summary\n' ], [ 'line', 'ok 132 overall result is PASS\n' ], [ 'assert', { ok: true, id: 131, name: 'no ugly "undefined" in output' } ], + [ 'comment', '# raw TAP > TAP consumer > summary\n' ], [ 'line', 'ok 133 no SKIP in summary\n' ], [ 'assert', { ok: true, id: 132, name: 'overall result is PASS' } ], @@ -938,10 +938,10 @@ module.exports = [ 'assert', { ok: true, id: 136, name: 'todo summary is not in TAP output' } ], [ 'line', '# TAP producer via require("tap")\n' ], - [ 'comment', '# TAP producer via require("tap")\n' ], [ 'line', 'ok 138 overall result is PASS\n' ], [ 'assert', { ok: true, id: 137, name: 'no ugly "undefined" in output' } ], + [ 'comment', '# TAP producer via require("tap")\n' ], [ 'line', 'ok 139 captures ok SKIP\n' ], [ 'assert', { ok: true, id: 138, name: 'overall result is PASS' } ], @@ -962,39 +962,39 @@ module.exports = [ 'assert', { ok: true, id: 144, name: 'todo summary is not in TAP output' } ], [ 'line', '# tests 22\n' ], - [ 'comment', '# tests 22\n' ], [ 'line', '# pass 22\n' ], - [ 'comment', '# pass 22\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 146 test/test-directives.js\n' ], [ 'assert', { ok: true, id: 145, name: 'no ugly "undefined" in output' } ], + [ 'comment', '# tests 22\n' ], + [ 'comment', '# pass 22\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# test-skip.js\n' ], - [ 'comment', '# test-skip.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', 'ok 147 does not count as failure # SKIP\n' ], [ 'assert', { ok: true, id: 146, name: 'test/test-directives.js' } ], + [ 'comment', '# test-skip.js\n' ], + [ 'comment', '# TAP version 13\n' ], [ 'line', '# tests 1\n' ], - [ 'comment', '# tests 1\n' ], [ 'line', '# skip 1\n' ], - [ 'comment', '# skip 1\n' ], [ 'line', 'ok 148 test/test-skip.js\n' ], [ 'assert', { ok: true, id: 147, skip: true, name: 'does not count as failure' } ], + [ 'comment', '# tests 1\n' ], + [ 'comment', '# skip 1\n' ], [ 'line', '# test-test.js\n' ], - [ 'comment', '# test-test.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# testing the test object\n' ], - [ 'comment', '# testing the test object\n' ], [ 'line', 'ok 149 test object should be instanceof Test\n' ], [ 'assert', { ok: true, id: 148, name: 'test/test-skip.js' } ], + [ 'comment', '# test-test.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# testing the test object\n' ], [ 'line', 'ok 150 test object should be instanceof Harness\n' ], [ 'assert', { ok: true, @@ -1529,16 +1529,15 @@ module.exports = [ 'assert', { ok: true, id: 294, name: 'should have isa method' } ], [ 'line', '# tests 147\n' ], - [ 'comment', '# tests 147\n' ], [ 'line', '# pass 147\n' ], - [ 'comment', '# pass 147\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 296 test/test-test.js\n' ], [ 'assert', { ok: true, id: 295, name: 'isa method should be a function' } ], + [ 'comment', '# tests 147\n' ], + [ 'comment', '# pass 147\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# timeout.js\n' ], - [ 'comment', '# timeout.js\n' ], [ 'line', 'timeout test\n' ], [ 'extra', 'timeout test\n' ], [ 'line', 't.plan=2\n' ], @@ -1548,11 +1547,12 @@ module.exports = [ 'line', 'b assert\n' ], [ 'extra', 'b assert\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# timeout test with plan only\n' ], - [ 'comment', '# timeout test with plan only\n' ], [ 'line', 'ok 297 a\n' ], [ 'assert', { ok: true, id: 296, name: 'test/test-test.js' } ], + [ 'comment', '# timeout.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# timeout test with plan only\n' ], [ 'line', 'timeout test\n' ], [ 'extra', 'timeout test\n' ], [ 'line', 't.plan=2\n' ], @@ -1564,50 +1564,50 @@ module.exports = [ 'line', 'ok 298 b\n' ], [ 'assert', { ok: true, id: 297, name: 'a' } ], [ 'line', '# timeout test with plan and end\n' ], - [ 'comment', '# timeout test with plan and end\n' ], [ 'line', 'ok 299 a\n' ], [ 'assert', { ok: true, id: 298, name: 'b' } ], + [ 'comment', '# timeout test with plan and end\n' ], [ 'line', 'ok 300 b\n' ], [ 'assert', { ok: true, id: 299, name: 'a' } ], [ 'line', '# tests 4\n' ], - [ 'comment', '# tests 4\n' ], [ 'line', '# pass 4\n' ], - [ 'comment', '# pass 4\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 301 test/timeout.js\n' ], [ 'assert', { ok: true, id: 300, name: 'b' } ], + [ 'comment', '# tests 4\n' ], + [ 'comment', '# pass 4\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# trivial-success.js\n' ], - [ 'comment', '# trivial-success.js\n' ], [ 'line', 'ok 302 test/trivial-success.js\n' ], [ 'assert', { ok: true, id: 301, name: 'test/timeout.js' } ], + [ 'comment', '# trivial-success.js\n' ], [ 'line', '# undefined_indented.js\n' ], - [ 'comment', '# undefined_indented.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# consume yaml\n' ], - [ 'comment', '# consume yaml\n' ], [ 'line', 'ok 303 should be equivalent\n' ], [ 'assert', { ok: true, id: 302, name: 'test/trivial-success.js' } ], + [ 'comment', '# undefined_indented.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# consume yaml\n' ], [ 'line', '# tests 1\n' ], - [ 'comment', '# tests 1\n' ], [ 'line', '# pass 1\n' ], - [ 'comment', '# pass 1\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 304 test/undefined_indented.js\n' ], [ 'assert', { ok: true, id: 303, name: 'should be equivalent' } ], + [ 'comment', '# tests 1\n' ], + [ 'comment', '# pass 1\n' ], + [ 'comment', '# ok\n' ], [ 'line', '# valid-command.js\n' ], - [ 'comment', '# valid-command.js\n' ], [ 'line', '# TAP version 13\n' ], - [ 'comment', '# TAP version 13\n' ], [ 'line', '# valid command\n' ], - [ 'comment', '# valid command\n' ], [ 'line', 'ok 305 should be equivalent\n' ], [ 'assert', { ok: true, id: 304, name: 'test/undefined_indented.js' } ], + [ 'comment', '# valid-command.js\n' ], + [ 'comment', '# TAP version 13\n' ], + [ 'comment', '# valid command\n' ], [ 'line', 'ok 306 should be equivalent\n' ], [ 'assert', { ok: true, id: 305, name: 'should be equivalent' } ], @@ -1624,13 +1624,13 @@ module.exports = [ 'assert', { ok: true, id: 309, name: 'should be equivalent' } ], [ 'line', '# tests 6\n' ], - [ 'comment', '# tests 6\n' ], [ 'line', '# pass 6\n' ], - [ 'comment', '# pass 6\n' ], [ 'line', '# ok\n' ], - [ 'comment', '# ok\n' ], [ 'line', 'ok 311 test/valid-command.js\n' ], [ 'assert', { ok: true, id: 310, name: 'should be equal' } ], + [ 'comment', '# tests 6\n' ], + [ 'comment', '# pass 6\n' ], + [ 'comment', '# ok\n' ], [ 'line', '1..311\n' ], [ 'assert', { ok: true, id: 311, name: 'test/valid-command.js' } ], diff --git a/test/fixtures/too-many.js b/test/fixtures/too-many.js index 828ff68..88cde31 100644 --- a/test/fixtures/too-many.js +++ b/test/fixtures/too-many.js @@ -7,9 +7,9 @@ module.exports = [ 'line', 'ok 2 should be equivalent\n' ], [ 'assert', { ok: true, id: 1, name: 'should be equal' } ], [ 'line', '# boop\n' ], - [ 'comment', '# boop\n' ], [ 'line', 'ok 3 should be equal\n' ], [ 'assert', { ok: true, id: 2, name: 'should be equivalent' } ], + [ 'comment', '# boop\n' ], [ 'line', 'ok 4 (unnamed assert)\n' ], [ 'assert', { ok: true, id: 3, name: 'should be equal' } ], [ 'line', '1..3\n' ], diff --git a/test/fixtures/unknown-amount-and-failures.js b/test/fixtures/unknown-amount-and-failures.js index 0a3cf97..fffbf16 100644 --- a/test/fixtures/unknown-amount-and-failures.js +++ b/test/fixtures/unknown-amount-and-failures.js @@ -3,10 +3,10 @@ module.exports = [ 'version', '13' ], [ 'line', 'ok 1 - retrieving servers from the database\n' ], [ 'line', '# need to ping 6 servers\n' ], - [ 'comment', '# need to ping 6 servers\n' ], [ 'line', 'ok 2 - pinged diamond\n' ], [ 'assert', { ok: true, id: 1, name: 'retrieving servers from the database' } ], + [ 'comment', '# need to ping 6 servers\n' ], [ 'line', 'ok 3 - pinged ruby\n' ], [ 'assert', { ok: true, id: 2, name: 'pinged diamond' } ], [ 'line', 'not ok 4 - pinged saphire\n' ], From c084d002c0a526f6b54c8f20360e83ca9c5dc533 Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 31 May 2015 15:33:50 -0700 Subject: [PATCH 2/4] Use newer tap --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f8b82a8..ea82e45 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "glob": "^5.0.2", - "tap": "~0.4.6", + "tap": "^1.2.0", "tape": "^3.5.0" }, "scripts": { From f4429e542b3ac6bee18756f9deadb2d14651fcbd Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 31 May 2015 15:34:57 -0700 Subject: [PATCH 3/4] Travis: test on iojs and 0.12 And leave out 0.8, since it ships with a broken npm. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cc4dba2..6064ca0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: node_js node_js: - - "0.8" - "0.10" + - "0.12" + - "iojs" From 5576d11b533845080baf76618485f314325cf2e0 Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 31 May 2015 15:50:58 -0700 Subject: [PATCH 4/4] Keep comments in child tests with child test --- index.js | 32 ++++++----- test/fixtures/child-extra.js | 12 +++-- test/fixtures/comment-mid-diag-postplan.js | 59 +++++++++++++++++++++ test/fixtures/comment-mid-diag-postplan.tap | 21 ++++++++ test/fixtures/comment-mid-diag.js | 24 ++++++--- test/fixtures/comment-mid-diag.tap | 8 ++- test/fixtures/extra-in-child.js | 3 +- test/fixtures/indented-stdout-noise.js | 24 ++++++--- 8 files changed, 146 insertions(+), 37 deletions(-) create mode 100644 test/fixtures/comment-mid-diag-postplan.js create mode 100644 test/fixtures/comment-mid-diag-postplan.tap diff --git a/index.js b/index.js index c022ff0..c3d84ae 100644 --- a/index.js +++ b/index.js @@ -350,13 +350,6 @@ Parser.prototype._parse = function (line) { this.emit('line', line) - // comment, but let "# Subtest:" comments start a child - var c = line.match(/^(\s+)?#(.*)/) - if (c && !(c[1] && /^ Subtest: /.test(c[2]))) { - this.emitComment(line) - return - } - var bailout = line.match(/^bail out!(.*)\n$/i) if (bailout) { this.sawValidTap = true @@ -375,13 +368,6 @@ Parser.prototype._parse = function (line) { return } - // if we got a plan at the end, or a 1..0 plan, then we can't - // have any more results, yamlish, or child sets. - if (this.postPlan) { - this.emit('extra', line) - return - } - // still belongs to the child. if (this.child) { if (line.indexOf(this.child.indent) === 0) { @@ -389,6 +375,10 @@ Parser.prototype._parse = function (line) { this.child.write(line) return } + if (line.trim().charAt(0) === '#') { + this.emitComment(line) + return + } // a child test can only end when we get an test point line. // anything else is extra. if (this.child.sawValidTap && !/^(not )?ok/.test(line)) { @@ -397,6 +387,20 @@ Parser.prototype._parse = function (line) { } } + // comment, but let "# Subtest:" comments start a child + var c = line.match(/^(\s+)?#(.*)/) + if (c && !(c[1] && /^ Subtest: /.test(c[2]))) { + this.emitComment(line) + return + } + + // if we got a plan at the end, or a 1..0 plan, then we can't + // have any more results, yamlish, or child sets. + if (this.postPlan) { + this.emit('extra', line) + return + } + var indent = line.match(/^[ \t]+/) if (indent) { indent = indent[0] diff --git a/test/fixtures/child-extra.js b/test/fixtures/child-extra.js index a82a18a..1007865 100644 --- a/test/fixtures/child-extra.js +++ b/test/fixtures/child-extra.js @@ -7,11 +7,19 @@ module.exports = [ 'comment', '# Subtest: test/debug-test.js\n' ], [ 'line', 'TAP version 13\n' ], [ 'version', '13' ], + [ 'line', '# debug test\n' ], + [ 'comment', '# debug test\n' ], [ 'line', 'ok 1 Should output debugger message\n' ], [ 'line', '1..1\n' ], [ 'assert', { ok: true, id: 1, name: 'Should output debugger message' } ], [ 'plan', { start: 1, end: 1 } ], + [ 'line', '# tests 1\n' ], + [ 'comment', '# tests 1\n' ], + [ 'line', '# pass 1\n' ], + [ 'comment', '# pass 1\n' ], + [ 'line', '# ok\n' ], + [ 'comment', '# ok\n' ], [ 'complete', { ok: true, count: 1, pass: 1, plan: { start: 1, end: 1 } } ] ] ], [ 'line', 'debug test\n' ], @@ -22,17 +30,13 @@ module.exports = [ 'extra', '\'Debugger listening on port 5858\\n\'\n' ], [ 'line', ' TAP version 13\n' ], [ 'line', ' # debug test\n' ], - [ 'comment', ' # debug test\n' ], [ 'line', ' ok 1 Should output debugger message\n' ], [ 'line', ' \n' ], [ 'line', ' 1..1\n' ], [ 'line', ' # tests 1\n' ], - [ 'comment', ' # tests 1\n' ], [ 'line', ' # pass 1\n' ], - [ 'comment', ' # pass 1\n' ], [ 'line', ' \n' ], [ 'line', ' # ok\n' ], - [ 'comment', ' # ok\n' ], [ 'line', 'ok 1 - test/debug-test.js # time=537.383ms\n' ], [ 'line', '1..1\n' ], [ 'assert', diff --git a/test/fixtures/comment-mid-diag-postplan.js b/test/fixtures/comment-mid-diag-postplan.js new file mode 100644 index 0000000..48b93e9 --- /dev/null +++ b/test/fixtures/comment-mid-diag-postplan.js @@ -0,0 +1,59 @@ +module.exports = +[ [ 'line', '# before version\n' ], + [ 'comment', '# before version\n' ], + [ 'line', 'TAP version 13\n' ], + [ 'version', '13' ], + [ 'line', '# after version, before result\n' ], + [ 'comment', '# after version, before result\n' ], + [ 'line', 'not ok 1 - please keep my diags\n' ], + [ 'line', ' # before diag\n' ], + [ 'line', ' ---\n' ], + [ 'line', ' # mid diag\n' ], + [ 'line', ' after: comment\n' ], + [ 'line', ' ...\n' ], + [ 'assert', + { ok: false, + id: 1, + name: 'please keep my diags', + diag: { after: 'comment' } } ], + [ 'comment', ' # before diag\n' ], + [ 'comment', ' # mid diag\n' ], + [ 'line', ' # after diag\n' ], + [ 'comment', ' # after diag\n' ], + [ 'line', ' # Subtest: child\n' ], + [ 'child', + [ [ 'line', '# Subtest: child\n' ], + [ 'comment', '# Subtest: child\n' ], + [ 'line', '1..2\n' ], + [ 'plan', { start: 1, end: 2 } ], + [ 'line', '# before 1\n' ], + [ 'comment', '# before 1\n' ], + [ 'line', 'ok 1\n' ], + [ 'line', '# before 2\n' ], + [ 'line', 'ok 2\n' ], + [ 'assert', { ok: true, id: 1 } ], + [ 'comment', '# before 2\n' ], + [ 'assert', { ok: true, id: 2 } ], + [ 'complete', + { ok: true, count: 2, pass: 2, plan: { start: 1, end: 2 } } ] ] ], + [ 'line', ' 1..2\n' ], + [ 'line', ' # before 1\n' ], + [ 'line', ' ok 1\n' ], + [ 'line', ' # before 2\n' ], + [ 'line', ' ok 2\n' ], + [ 'line', '# before 2\n' ], + [ 'comment', '# before 2\n' ], + [ 'line', 'ok 2 - child\n' ], + [ 'line', '# after 2, brefore plan\n' ], + [ 'line', '1..2\n' ], + [ 'assert', { ok: true, id: 2, name: 'child' } ], + [ 'comment', '# after 2, brefore plan\n' ], + [ 'plan', { start: 1, end: 2 } ], + [ 'line', '# after plan\n' ], + [ 'comment', '# after plan\n' ], + [ 'complete', + { ok: false, + count: 2, + pass: 1, + fail: 1, + plan: { start: 1, end: 2 } } ] ] diff --git a/test/fixtures/comment-mid-diag-postplan.tap b/test/fixtures/comment-mid-diag-postplan.tap new file mode 100644 index 0000000..03b42bd --- /dev/null +++ b/test/fixtures/comment-mid-diag-postplan.tap @@ -0,0 +1,21 @@ +# before version +TAP version 13 +# after version, before result +not ok 1 - please keep my diags + # before diag + --- + # mid diag + after: comment + ... + # after diag + # Subtest: child + 1..2 + # before 1 + ok 1 + # before 2 + ok 2 +# before 2 +ok 2 - child +# after 2, brefore plan +1..2 +# after plan diff --git a/test/fixtures/comment-mid-diag.js b/test/fixtures/comment-mid-diag.js index 97fdd82..43556cf 100644 --- a/test/fixtures/comment-mid-diag.js +++ b/test/fixtures/comment-mid-diag.js @@ -1,8 +1,12 @@ module.exports = -[ [ 'line', 'TAP version 13\n' ], +[ [ 'line', '# before version\n' ], + [ 'comment', '# before version\n' ], + [ 'line', 'TAP version 13\n' ], [ 'version', '13' ], - [ 'line', '1..1\n' ], - [ 'plan', { start: 1, end: 1 } ], + [ 'line', '# after version, before plan\n' ], + [ 'comment', '# after version, before plan\n' ], + [ 'line', '1..2\n' ], + [ 'plan', { start: 1, end: 2 } ], [ 'line', '# before result\n' ], [ 'comment', '# before result\n' ], [ 'line', 'not ok 1 - please keep my diags\n' ], @@ -20,11 +24,15 @@ module.exports = [ 'comment', ' # mid diag\n' ], [ 'line', ' # after diag\n' ], [ 'comment', ' # after diag\n' ], - [ 'line', '# after result\n' ], - [ 'comment', '# after result\n' ], + [ 'line', '# before 2\n' ], + [ 'comment', '# before 2\n' ], + [ 'line', 'ok 2\n' ], + [ 'line', '# after 2\n' ], + [ 'assert', { ok: true, id: 2 } ], + [ 'comment', '# after 2\n' ], [ 'complete', { ok: false, - count: 1, - pass: 0, + count: 2, + pass: 1, fail: 1, - plan: { start: 1, end: 1 } } ] ] + plan: { start: 1, end: 2 } } ] ] diff --git a/test/fixtures/comment-mid-diag.tap b/test/fixtures/comment-mid-diag.tap index f30b571..6f724bd 100644 --- a/test/fixtures/comment-mid-diag.tap +++ b/test/fixtures/comment-mid-diag.tap @@ -1,5 +1,7 @@ +# before version TAP version 13 -1..1 +# after version, before plan +1..2 # before result not ok 1 - please keep my diags # before diag @@ -8,4 +10,6 @@ not ok 1 - please keep my diags after: comment ... # after diag -# after result +# before 2 +ok 2 +# after 2 diff --git a/test/fixtures/extra-in-child.js b/test/fixtures/extra-in-child.js index 0baa0ef..6b2dbfb 100644 --- a/test/fixtures/extra-in-child.js +++ b/test/fixtures/extra-in-child.js @@ -100,6 +100,8 @@ module.exports = [ 'assert', { ok: true, id: 2, time: 24.16, name: 'update email' } ], [ 'plan', { start: 1, end: 2 } ], + [ 'line', '# time=174.236ms\n' ], + [ 'comment', '# time=174.236ms\n' ], [ 'complete', { ok: true, count: 2, pass: 2, plan: { start: 1, end: 2 } } ] ] ], [ 'line', ' TAP version 13\n' ], @@ -146,7 +148,6 @@ module.exports = [ 'line', ' ok 2 - update email # time=24.16ms\n' ], [ 'line', ' 1..2\n' ], [ 'line', ' # time=174.236ms\n' ], - [ 'comment', ' # time=174.236ms\n' ], [ 'line', 'ok 1 - test/01c-user-updates.js # time=339.14ms\n' ], [ 'line', '1..1\n' ], [ 'assert', diff --git a/test/fixtures/indented-stdout-noise.js b/test/fixtures/indented-stdout-noise.js index 6d4c6ec..4edec9b 100644 --- a/test/fixtures/indented-stdout-noise.js +++ b/test/fixtures/indented-stdout-noise.js @@ -39,6 +39,10 @@ module.exports = count: 0, pass: 0, plan: { start: 1, end: 0, skipAll: true } } ] ] ], + [ 'line', '# package - Easy package.json exports.\n' ], + [ 'comment', '# package - Easy package.json exports.\n' ], + [ 'line', '## Intro\n' ], + [ 'comment', '## Intro\n' ], [ 'line', 'This module provides an easy way to export package.json data.\n' ], [ 'extra', @@ -51,8 +55,12 @@ module.exports = 'find your package.json file automatically. Cool, ugh?\n' ], [ 'extra', 'find your package.json file automatically. Cool, ugh?\n' ], + [ 'line', '## Installation\n' ], + [ 'comment', '## Installation\n' ], [ 'line', ' # Subtest: npm install package line\n' ], [ 'line', ' $ npm install package\n' ], + [ 'line', '## Usage\n' ], + [ 'comment', '## Usage\n' ], [ 'line', ' var package = require(\'package\')(); // contains package.json data.\n' ], [ 'line', ' \n' ], @@ -60,14 +68,20 @@ module.exports = [ 'line', ' \n' ], [ 'line', ' yourAwesomeModule.version = package.version;\n' ], + [ 'line', '## Contribution\n' ], + [ 'comment', '## Contribution\n' ], [ 'line', 'Bug fixes and features are welcomed.\n' ], [ 'extra', 'Bug fixes and features are welcomed.\n' ], + [ 'line', '## Other similar modules\n' ], + [ 'comment', '## Other similar modules\n' ], [ 'line', '- pkginfo (https://github.com/indexzero/node-pkginfo) by indexzero.\n' ], [ 'extra', '- pkginfo (https://github.com/indexzero/node-pkginfo) by indexzero.\n' ], [ 'line', '- JSON.parse + fs.readFile\n' ], [ 'extra', '- JSON.parse + fs.readFile\n' ], + [ 'line', '## License\n' ], + [ 'comment', '## License\n' ], [ 'line', 'MIT License\n' ], [ 'extra', 'MIT License\n' ], [ 'line', 'Copyright (C) 2011 Veselin Todorov\n' ], @@ -131,14 +145,14 @@ module.exports = [ 'line', '1..1\n' ], [ 'assert', { ok: true, id: 1, time: 5.26, name: 'boom' } ], [ 'plan', { start: 1, end: 1 } ], + [ 'line', '# time=12.555ms\n' ], + [ 'comment', '# time=12.555ms\n' ], [ 'complete', { ok: true, count: 1, pass: 1, plan: { start: 1, end: 1 } } ] ] ], [ 'line', ' TAP version 13\n' ], [ 'line', ' # Subtest: boom\n' ], [ 'line', ' # package - Easy package.json exports.\n' ], - [ 'comment', ' # package - Easy package.json exports.\n' ], [ 'line', ' ## Intro\n' ], - [ 'comment', ' ## Intro\n' ], [ 'line', ' This module provides an easy way to export package.json data.\n' ], [ 'line', @@ -146,11 +160,9 @@ module.exports = [ 'line', ' find your package.json file automatically. Cool, ugh?\n' ], [ 'line', ' ## Installation\n' ], - [ 'comment', ' ## Installation\n' ], [ 'line', ' # Subtest: npm install package line\n' ], [ 'line', ' $ npm install package\n' ], [ 'line', ' ## Usage\n' ], - [ 'comment', ' ## Usage\n' ], [ 'line', ' var package = require(\'package\')(); // contains package.json data.\n' ], [ 'line', ' \n' ], @@ -159,15 +171,12 @@ module.exports = [ 'line', ' yourAwesomeModule.version = package.version;\n' ], [ 'line', ' ## Contribution\n' ], - [ 'comment', ' ## Contribution\n' ], [ 'line', ' Bug fixes and features are welcomed.\n' ], [ 'line', ' ## Other similar modules\n' ], - [ 'comment', ' ## Other similar modules\n' ], [ 'line', ' - pkginfo (https://github.com/indexzero/node-pkginfo) by indexzero.\n' ], [ 'line', ' - JSON.parse + fs.readFile\n' ], [ 'line', ' ## License\n' ], - [ 'comment', ' ## License\n' ], [ 'line', ' MIT License\n' ], [ 'line', ' Copyright (C) 2011 Veselin Todorov\n' ], [ 'line', @@ -202,7 +211,6 @@ module.exports = [ 'line', ' ok 1 - boom # time=5.26ms\n' ], [ 'line', ' 1..1\n' ], [ 'line', ' # time=12.555ms\n' ], - [ 'comment', ' # time=12.555ms\n' ], [ 'line', 'not ok 1 - index.js # time=201.609ms\n' ], [ 'line', ' ---\n' ], [ 'line', ' arguments:\n' ],