Index: native_client_sdk/src/tools/tests/nacl_config_test.py |
diff --git a/native_client_sdk/src/tools/tests/nacl_config_test.py b/native_client_sdk/src/tools/tests/nacl_config_test.py |
index 31957c59aeb97ba4b6a283ce2a523810a78fc4ba..b0cbe26f28778dddb086cbf888beeb813a789b91 100755 |
--- a/native_client_sdk/src/tools/tests/nacl_config_test.py |
+++ b/native_client_sdk/src/tools/tests/nacl_config_test.py |
@@ -10,7 +10,7 @@ import unittest |
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) |
TOOLS_DIR = os.path.dirname(SCRIPT_DIR) |
CHROME_SRC = os.path.dirname(os.path.dirname(os.path.dirname(TOOLS_DIR))) |
-MOCK_DIR = os.path.join(CHROME_SRC, "third_party", "pymock") |
+MOCK_DIR = os.path.join(CHROME_SRC, 'third_party', 'pymock') |
# For the mock library |
sys.path.append(MOCK_DIR) |
@@ -40,6 +40,13 @@ class TestNaclConfig(unittest.TestCase): |
self.patches.append(patch) |
return patch.start() |
+ @mock.patch('nacl_config.GetCFlags') |
+ def testMainArgParsing(self, mock_get_cflags): |
+ mock_get_cflags.return_value = 'flags' |
+ with mock.patch('sys.stdout'): |
+ nacl_config.main(['--cflags']) |
+ mock_get_cflags.assert_called() |
+ |
def testCFlags(self): |
cases = { |
'newlib': '-I/sdk_root/include -I/sdk_root/include/newlib', |