diff options
Diffstat (limited to 'src/scripts')
-rwxr-xr-x | src/scripts/python_unittests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/scripts/python_unittests.py b/src/scripts/python_unittests.py index 37fa25721..337f5369e 100755 --- a/src/scripts/python_unittests.py +++ b/src/scripts/python_unittests.py @@ -21,6 +21,7 @@ from configure import ModulesChooser # pylint: disable=wrong-import-position class AmalgamationHelperTests(unittest.TestCase): def test_matcher_std_includes(self): self.assertEqual(AmalgamationHelper.is_unconditional_std_include("#include <string>"), "string") + self.assertEqual(AmalgamationHelper.is_unconditional_std_include("#include <string> // comment"), "string") self.assertEqual(AmalgamationHelper.is_unconditional_std_include("#include <myfile.h>"), None) self.assertEqual(AmalgamationHelper.is_unconditional_std_include("#include <unistd.h>"), None) @@ -31,6 +32,10 @@ class AmalgamationHelperTests(unittest.TestCase): "oids.h") self.assertEqual(AmalgamationHelper.is_botan_include("#include <botan/internal/socket.h>"), "internal/socket.h") + self.assertEqual(AmalgamationHelper.is_botan_include("#include <botan/oids.h> // comment"), + "oids.h") + self.assertEqual(AmalgamationHelper.is_botan_include("#include <botan/internal/socket.h> // comment"), + "internal/socket.h") self.assertEqual(AmalgamationHelper.is_botan_include(" #include <botan/oids.h>"), "oids.h") self.assertEqual(AmalgamationHelper.is_botan_include(" #include <botan/internal/socket.h>"), @@ -51,6 +56,11 @@ class AmalgamationHelperTests(unittest.TestCase): self.assertEqual(AmalgamationHelper.is_any_include(" #include <unistd.h>"), "unistd.h") self.assertEqual(AmalgamationHelper.is_any_include(" #include <botan/oids.h>"), "botan/oids.h") + self.assertEqual(AmalgamationHelper.is_any_include("#include <string> // comment"), "string") + self.assertEqual(AmalgamationHelper.is_any_include("#include <myfile.h> // comment"), "myfile.h") + self.assertEqual(AmalgamationHelper.is_any_include("#include <unistd.h> // comment"), "unistd.h") + self.assertEqual(AmalgamationHelper.is_any_include("#include <botan/oids.h> // comment"), + "botan/oids.h") class CompilerDetection(unittest.TestCase): |