Skip to content

Commit

Permalink
No need to # in the Bail out! message
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jan 28, 2017
1 parent bfb5942 commit 5282f6c
Show file tree
Hide file tree
Showing 28 changed files with 38 additions and 39 deletions.
3 changes: 1 addition & 2 deletions lib/test.js
Expand Up @@ -148,8 +148,7 @@ Test.prototype.bailout = function (message) {
this.parent.bailout(message)
else {
this.process()
message = message ? ' # ' + ('' + message).trim() : ''
message = message.replace(/^( #)+ /, ' # ')
message = message ? ' ' + ('' + message).trim() : ''
message = message.replace(/[\r\n]/g, ' ')
this.parser.write('Bail out!' + message + '\n')
}
Expand Down
2 changes: 1 addition & 1 deletion test/test/bail-error-object--bail--buffer.tap
@@ -1,3 +1,3 @@
TAP version 13
Bail out! # TypeError: wat
Bail out! TypeError: wat

2 changes: 1 addition & 1 deletion test/test/bail-error-object--bail.tap
@@ -1,3 +1,3 @@
TAP version 13
Bail out! # TypeError: wat
Bail out! TypeError: wat

2 changes: 1 addition & 1 deletion test/test/bail-error-object--buffer.tap
@@ -1,3 +1,3 @@
TAP version 13
Bail out! # TypeError: wat
Bail out! TypeError: wat

2 changes: 1 addition & 1 deletion test/test/bail-error-object.tap
@@ -1,3 +1,3 @@
TAP version 13
Bail out! # TypeError: wat
Bail out! TypeError: wat

2 changes: 1 addition & 1 deletion test/test/bail-teardown--bail--buffer.tap
Expand Up @@ -5,5 +5,5 @@ ok 2 - child ___/# time=[0-9.]+(ms)?/~~~ {
1..1
}

Bail out! # i did not want to be torn down
Bail out! i did not want to be torn down

2 changes: 1 addition & 1 deletion test/test/bail-teardown--bail.tap
Expand Up @@ -5,5 +5,5 @@ ok 1 - this is fine
1..1
ok 2 - child ___/# time=[0-9.]+(ms)?/~~~

Bail out! # i did not want to be torn down
Bail out! i did not want to be torn down

2 changes: 1 addition & 1 deletion test/test/bail-teardown--buffer.tap
Expand Up @@ -5,5 +5,5 @@ ok 2 - child ___/# time=[0-9.]+(ms)?/~~~ {
1..1
}

Bail out! # i did not want to be torn down
Bail out! i did not want to be torn down

2 changes: 1 addition & 1 deletion test/test/bail-teardown-async--bail--buffer.tap
Expand Up @@ -3,5 +3,5 @@ ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}

Bail out! # teardown fail
Bail out! teardown fail

2 changes: 1 addition & 1 deletion test/test/bail-teardown-async--bail.tap
Expand Up @@ -4,5 +4,5 @@ TAP version 13
ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~

# Subtest: barfoo
Bail out! # teardown fail
Bail out! teardown fail

2 changes: 1 addition & 1 deletion test/test/bail-teardown-async--buffer.tap
Expand Up @@ -3,5 +3,5 @@ ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}

Bail out! # teardown fail
Bail out! teardown fail

2 changes: 1 addition & 1 deletion test/test/bail-teardown-async.tap
Expand Up @@ -4,5 +4,5 @@ TAP version 13
ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~

# Subtest: barfoo
Bail out! # teardown fail
Bail out! teardown fail

2 changes: 1 addition & 1 deletion test/test/bail-teardown.tap
Expand Up @@ -5,5 +5,5 @@ ok 1 - this is fine
1..1
ok 2 - child ___/# time=[0-9.]+(ms)?/~~~

Bail out! # i did not want to be torn down
Bail out! i did not want to be torn down

4 changes: 2 additions & 2 deletions test/test/bailout--buffer.tap
Expand Up @@ -22,7 +22,7 @@ not ok 3 - this fails

not ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
Bail out! # cannot continue
Bail out! # # # cannot continue
}
Bail out! # cannot continue
Bail out! # # # cannot continue

2 changes: 1 addition & 1 deletion test/test/bailout-with-stuff-after--bail--buffer.tap
@@ -1,3 +1,3 @@
TAP version 13
Bail out! # this is fine
Bail out! this is fine

2 changes: 1 addition & 1 deletion test/test/bailout-with-stuff-after--bail.tap
@@ -1,3 +1,3 @@
TAP version 13
Bail out! # this is fine
Bail out! this is fine

2 changes: 1 addition & 1 deletion test/test/bailout-with-stuff-after--buffer.tap
@@ -1,3 +1,3 @@
TAP version 13
Bail out! # this is fine
Bail out! this is fine

2 changes: 1 addition & 1 deletion test/test/bailout-with-stuff-after.tap
@@ -1,3 +1,3 @@
TAP version 13
Bail out! # this is fine
Bail out! this is fine

2 changes: 1 addition & 1 deletion test/test/bailout.js
Expand Up @@ -23,7 +23,7 @@ t.test('async kid', function (t) {
t.pass('first timeout', { foo: 'blz' })
}, 50)
setTimeout(function () {
t.bailout('cannot continue')
t.bailout('# # # cannot continue')
})
})

Expand Down
4 changes: 2 additions & 2 deletions test/test/bailout.tap
Expand Up @@ -23,6 +23,6 @@ not ok 3 - this fails

# Subtest: async kid
1..2
Bail out! # cannot continue
Bail out! # cannot continue
Bail out! # # # cannot continue
Bail out! # # # cannot continue

4 changes: 2 additions & 2 deletions test/test/exit-on-bailout--bail--buffer.tap
Expand Up @@ -6,8 +6,8 @@ log in grandchild, after bailout
log in child, after grandchild
not ok 1 - child {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
Bail out! # cannot continue
Bail out! cannot continue
}
}
Bail out! # cannot continue
Bail out! cannot continue

4 changes: 2 additions & 2 deletions test/test/exit-on-bailout--bail.tap
Expand Up @@ -4,6 +4,6 @@ log in child, before grandchild
# Subtest: child
log in grandchild, before bailout
# Subtest: grandchild
Bail out! # cannot continue
Bail out! # cannot continue
Bail out! cannot continue
Bail out! cannot continue

4 changes: 2 additions & 2 deletions test/test/exit-on-bailout--buffer.tap
Expand Up @@ -6,8 +6,8 @@ log in grandchild, after bailout
log in child, after grandchild
not ok 1 - child {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
Bail out! # cannot continue
Bail out! cannot continue
}
}
Bail out! # cannot continue
Bail out! cannot continue

4 changes: 2 additions & 2 deletions test/test/exit-on-bailout.tap
Expand Up @@ -4,6 +4,6 @@ log in child, before grandchild
# Subtest: child
log in grandchild, before bailout
# Subtest: grandchild
Bail out! # cannot continue
Bail out! # cannot continue
Bail out! cannot continue
Bail out! cannot continue

4 changes: 2 additions & 2 deletions test/test/pragma--buffer.tap
Expand Up @@ -23,7 +23,7 @@ not ok 2 - ___/.*(node|iojs)(.exe)?.*/~~~pragma.js child bailout ___/# time=[0-9
{"args":["___/.*/~~~pragma.js","child","bailout"],"command":"___/.*(node|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1}
...
{
Bail out! # no pragmas come after bailout
Bail out! no pragmas come after bailout
}
Bail out! # no pragmas come after bailout
Bail out! no pragmas come after bailout

4 changes: 2 additions & 2 deletions test/test/pragma.tap
Expand Up @@ -18,6 +18,6 @@ not ok 1 - ___/.*(node|iojs)(.exe)?.*/~~~pragma.js child ___/# time=[0-9.]+(ms)?

pragma -child
# Subtest: ___/.*(node|iojs)(.exe)?.*/~~~pragma.js child bailout
Bail out! # no pragmas come after bailout
Bail out! # no pragmas come after bailout
Bail out! no pragmas come after bailout
Bail out! no pragmas come after bailout

4 changes: 2 additions & 2 deletions test/test/throw--buffer.tap
Expand Up @@ -38,7 +38,7 @@ not ok 3 - this fails

not ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
Bail out! # cannot continue
Bail out! cannot continue
}
Bail out! # cannot continue
Bail out! cannot continue

4 changes: 2 additions & 2 deletions test/test/throw.tap
Expand Up @@ -38,6 +38,6 @@ not ok 3 - this fails

# Subtest: async kid
1..2
Bail out! # cannot continue
Bail out! # cannot continue
Bail out! cannot continue
Bail out! cannot continue

0 comments on commit 5282f6c

Please sign in to comment.