diff --git a/test/harness/sta.js b/test/harness/sta.js index e779fc9108..7eb14b3856 100644 --- a/test/harness/sta.js +++ b/test/harness/sta.js @@ -13,7 +13,7 @@ function Test262Error(message) { } Test262Error.prototype.toString = function () { - return "Test262 Error: " + this.message; + return "Test262Error: " + this.message; }; var $ERROR; diff --git a/tools/packaging/test262.py b/tools/packaging/test262.py index 8e6fd0a105..aa396cbe10 100755 --- a/tools/packaging/test262.py +++ b/tools/packaging/test262.py @@ -209,10 +209,15 @@ class TestResult(object): if self.case.IsAsyncTest(): return self.AsyncHasFailed() or self.HasFailed() elif self.case.IsNegative(): - return not (self.HasFailed() and self.case.NegativeMatch(self.stderr)) + return not (self.HasFailed() and self.case.NegativeMatch(self.GetErrorOutput())) else: return self.HasFailed() + def GetErrorOutput(self): + if len(self.stderr) != 0: + return self.stderr + return self.stdout + class TestCase(object):