Merge pull request #101 from smikes/addl-console-negative-fixes

additional fixes suggested by @anba
This commit is contained in:
Brian Terlson 2014-10-24 10:31:39 -07:00
commit 0c0d1d3d46
2 changed files with 7 additions and 2 deletions

View File

@ -209,10 +209,15 @@ class TestResult(object):
if self.case.IsAsyncTest(): if self.case.IsAsyncTest():
return self.AsyncHasFailed() or self.HasFailed() return self.AsyncHasFailed() or self.HasFailed()
elif self.case.IsNegative(): 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: else:
return self.HasFailed() return self.HasFailed()
def GetErrorOutput(self):
if len(self.stderr) != 0:
return self.stderr
return self.stdout
class TestCase(object): class TestCase(object):