diff options
Diffstat (limited to 'SCons/cppTests.py')
-rw-r--r-- | SCons/cppTests.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/SCons/cppTests.py b/SCons/cppTests.py index a9aef9d..f781e81 100644 --- a/SCons/cppTests.py +++ b/SCons/cppTests.py @@ -55,6 +55,8 @@ substitution_input = """ #include XXX_FILE5 #include XXX_FILE6 + +#include SHELL_ESCAPED_H """ @@ -441,7 +443,8 @@ if_no_space_input = """ class cppTestCase(unittest.TestCase): def setUp(self): self.cpp = self.cpp_class(current = ".", - cpppath = ['/usr/include']) + cpppath = ['/usr/include'], + dict={"SHELL_ESCAPED_H": '\\"file-shell-computed-yes\\"'}) def test_basic(self): """Test basic #include scanning""" @@ -531,6 +534,7 @@ class cppAllTestCase(cppTestCase): def setUp(self): self.cpp = self.cpp_class(current = ".", cpppath = ['/usr/include'], + dict={"SHELL_ESCAPED_H": '\\"file-shell-computed-yes\\"'}, all=1) class PreProcessorTestCase(cppAllTestCase): @@ -546,6 +550,7 @@ class PreProcessorTestCase(cppAllTestCase): ('include', '<', 'file4-yes'), ('include', '"', 'file5-yes'), ('include', '<', 'file6-yes'), + ('include', '"', 'file-shell-computed-yes'), ] ifdef_expect = [ @@ -647,6 +652,7 @@ class DumbPreProcessorTestCase(cppAllTestCase): ('include', '<', 'file4-yes'), ('include', '"', 'file5-yes'), ('include', '<', 'file6-yes'), + ('include', '"', 'file-shell-computed-yes'), ] ifdef_expect = [ @@ -876,7 +882,9 @@ if __name__ == '__main__': fileTestCase, ] for tclass in tclasses: - names = unittest.getTestCaseNames(tclass, 'test_') + loader = unittest.TestLoader() + loader.testMethodPrefix = 'test_' + names = loader.getTestCaseNames(tclass) try: names = sorted(set(names)) except NameError: |