summaryrefslogtreecommitdiff
path: root/test/gtest_output_test.py
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-16 23:34:59 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-12-16 23:34:59 +0000
commit47ff745210c71ba79033fb69a7f832aa18b87977 (patch)
tree2ccb8a80d9d1ee12db0de85b03dc9e9ed957b25a /test/gtest_output_test.py
parentefa3f8463bbef22375de90ce020fb1e95a32fa7f (diff)
downloadgoogletest-47ff745210c71ba79033fb69a7f832aa18b87977.tar.gz
Removes uses of GTEST_HAS_STD_STRING.
git-svn-id: http://googletest.googlecode.com/svn/trunk@353 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'test/gtest_output_test.py')
-rwxr-xr-xtest/gtest_output_test.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/gtest_output_test.py b/test/gtest_output_test.py
index c8a38f5..8d9a40b 100755
--- a/test/gtest_output_test.py
+++ b/test/gtest_output_test.py
@@ -126,15 +126,15 @@ def RemoveTime(output):
def RemoveTestCounts(output):
"""Removes test counts from a Google Test program's output."""
- output = re.sub(r'\d+ tests, listed below',
+ output = re.sub(r'\d+ tests?, listed below',
'? tests, listed below', output)
output = re.sub(r'\d+ FAILED TESTS',
'? FAILED TESTS', output)
- output = re.sub(r'\d+ tests from \d+ test cases',
+ output = re.sub(r'\d+ tests? from \d+ test cases?',
'? tests from ? test cases', output)
- output = re.sub(r'\d+ tests from ([a-zA-Z_])',
+ output = re.sub(r'\d+ tests? from ([a-zA-Z_])',
r'? tests from \1', output)
- return re.sub(r'\d+ tests\.', '? tests.', output)
+ return re.sub(r'\d+ tests?\.', '? tests.', output)
def RemoveMatchingTests(test_output, pattern):
@@ -268,16 +268,16 @@ class GTestOutputTest(gtest_test_utils.TestCase):
normalized_actual = RemoveTestCounts(output)
normalized_golden = RemoveTestCounts(self.RemoveUnsupportedTests(golden))
- # This code is very handy when debugging test differences so I left it
- # here, commented.
- # open(os.path.join(
- # gtest_test_utils.GetSourceDir(),
- # '_gtest_output_test_normalized_actual.txt'), 'wb').write(
- # normalized_actual)
- # open(os.path.join(
- # gtest_test_utils.GetSourceDir(),
- # '_gtest_output_test_normalized_golden.txt'), 'wb').write(
- # normalized_golden)
+ # This code is very handy when debugging golden file differences:
+ if os.getenv('DEBUG_GTEST_OUTPUT_TEST'):
+ open(os.path.join(
+ gtest_test_utils.GetSourceDir(),
+ '_gtest_output_test_normalized_actual.txt'), 'wb').write(
+ normalized_actual)
+ open(os.path.join(
+ gtest_test_utils.GetSourceDir(),
+ '_gtest_output_test_normalized_golden.txt'), 'wb').write(
+ normalized_golden)
self.assert_(normalized_golden == normalized_actual)