Commit 4907d8d6 authored by isaacs's avatar isaacs

don't print diags multiple times on abort

Unnecessary.
parent cb95444e
......@@ -637,6 +637,7 @@ Parser.prototype.abort = function (message, extra) {
if (this.child) {
var b = this.child.buffered
this.child.abort(message, extra)
extra = null
if (b)
this.write('\n}\n')
}
......@@ -666,7 +667,6 @@ Parser.prototype.abort = function (message, extra) {
var ind = '' // new Array(this.level + 1).join(' ')
message = message.replace(/[\n\r\s\t]/g, ' ')
var point = '\nnot ok ' + n + ' - ' + message + '\n' + y
// point = ind + point.trimRight().split('\n').join('\n' + ind) + '\n'
if (this.planEnd === -1)
point += '1..' + n + '\n'
......
......@@ -68,9 +68,6 @@ function bufferedTest (d) { return function (t) {
' }\n',
'}\n',
'not ok 2 - nope\n',
d && d.some ? ' ---\n' : '',
d && d.some ? ' some: diags\n' : '',
d && d.some ? ' ...\n' : '',
'1..2'
].join('').split('\n').map(function (l) { return l + '\n' })
var expectResults = {
......@@ -96,7 +93,6 @@ function bufferedTest (d) { return function (t) {
}
]
}
if (d && d.some) expectResults.failures[0].diag = d
p.on('line', lines.push.bind(lines))
p.on('complete', function (results) {
t.same(lines, expectLines)
......@@ -126,14 +122,8 @@ function unbufferedTest (d) { return function (t) {
d && d.some ? ' some: diags\n' : '',
d && d.some ? ' ...\n' : '',
' not ok 1 - nope\n',
d && d.some ? ' ---\n' : '',
d && d.some ? ' some: diags\n' : '',
d && d.some ? ' ...\n' : '',
'}\n',
'not ok 2 - nope\n',
d && d.some ? ' ---\n' : '',
d && d.some ? ' some: diags\n' : '',
d && d.some ? ' ...\n' : '',
'1..2'
].join('').split('\n').map(function (l) { return l + '\n' })
......@@ -160,7 +150,6 @@ function unbufferedTest (d) { return function (t) {
}
]
}
if (d && d.some) expectResults.failures[0].diag = d
p.on('line', lines.push.bind(lines))
p.on('complete', function (results) {
t.same(lines, expectLines)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment