aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest_uninitialized_test.py
diff options
context:
space:
mode:
authorshiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925>2008-07-08 21:32:17 +0000
committershiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925>2008-07-08 21:32:17 +0000
commite4e9a8bd7d2dbbad62030c8f80513e3c81b32213 (patch)
tree08e242f8835e0688031e27305c5d58c24282f2e7 /test/gtest_uninitialized_test.py
parentd201456903f3ecae1f7794edfab0d5678e642265 (diff)
downloadgoogletest-e4e9a8bd7d2dbbad62030c8f80513e3c81b32213.tar.gz
googletest-e4e9a8bd7d2dbbad62030c8f80513e3c81b32213.tar.bz2
googletest-e4e9a8bd7d2dbbad62030c8f80513e3c81b32213.zip
Makes the autotools scripts work on Mac OS X. Also hopefully makes gtest compile on Windows CE.
Diffstat (limited to 'test/gtest_uninitialized_test.py')
-rwxr-xr-xtest/gtest_uninitialized_test.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/gtest_uninitialized_test.py b/test/gtest_uninitialized_test.py
index 1956a7b9..d553bbf9 100755
--- a/test/gtest_uninitialized_test.py
+++ b/test/gtest_uninitialized_test.py
@@ -80,8 +80,15 @@ def GetOutput(command):
def TestExitCodeAndOutput(command):
"""Runs the given command and verifies its exit code and output."""
- # 256 corresponds to return code 0.
- AssertEq(256, os.system(command))
+ # Verifies that 'command' exits with code 1.
+ if IS_WINDOWS:
+ # On Windows, os.system(command) returns the exit code of 'command'.
+ AssertEq(1, os.system(command))
+ else:
+ # On Unix-like system, os.system(command) returns 256 times the
+ # exit code of 'command'.
+ AssertEq(256, os.system(command))
+
output = GetOutput(command)
Assert('InitGoogleTest' in output)