diff --git a/test/simple/test-abort-fatal-error.js b/test/simple/test-abort-fatal-error.js index d5d8866ecc..14b94eab34 100644 --- a/test/simple/test-abort-fatal-error.js +++ b/test/simple/test-abort-fatal-error.js @@ -34,6 +34,17 @@ cmdline += ' --max-old-space-size=4 --max-new-space-size=1'; cmdline += ' -e "a = []; for (i = 0; i < 1e9; i++) { a.push({}) }"'; exec(cmdline, function(err, stdout, stderr) { - assert(err); - assert(stderr.toString().match(/abort/i)); + if (!err) { + console.log(stdout); + console.log(stderr); + assert(false, 'this test should fail'); + return; + } + + if (err.code !== 134 || err.signal !== 'SIGABRT') { + console.log(stdout); + console.log(stderr); + console.log(err); + assert(false, err); + } });