diff options
Diffstat (limited to 'tests/analysis/scan')
-rw-r--r-- | tests/analysis/scan/pyapi.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/analysis/scan/pyapi.py b/tests/analysis/scan/pyapi.py index 8764074..2aaaeec 100644 --- a/tests/analysis/scan/pyapi.py +++ b/tests/analysis/scan/pyapi.py @@ -73,6 +73,7 @@ class TestRostPythonAPI(ChrysalideTestCase): self.assertEqual(source, transformed[0]) + mod = find_token_modifiers_for_name('hex') self.assertIsNotNone(mod) @@ -81,6 +82,7 @@ class TestRostPythonAPI(ChrysalideTestCase): self.assertEqual(binascii.hexlify(source), transformed[0]) + mod = find_token_modifiers_for_name('rev') self.assertIsNotNone(mod) @@ -90,6 +92,18 @@ class TestRostPythonAPI(ChrysalideTestCase): self.assertEqual(source[::-1], transformed[0]) + mod = find_token_modifiers_for_name('base64') + self.assertIsNotNone(mod) + + source = b'ABC' + transformed = mod.transform(source) + + self.assertEqual(len(transformed), 3) + self.assertEqual(transformed[0], b'QUJD') + self.assertEqual(transformed[1], b'FCQw') + self.assertEqual(transformed[2], b'BQkM') + + def testBytePatternModifiersAPI(self): """Validate the API for pattern modifiers.""" |