summaryrefslogtreecommitdiff
path: root/tests/analysis/scan
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-10-12 11:05:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-10-12 11:05:51 (GMT)
commitbd7816732508f5e1262b2292779db313d8969184 (patch)
treedc8f44829133a3b0fe90fb2630fd96bfdb0a2015 /tests/analysis/scan
parentab6b87b7309e2d00926615f6557016bee6ab0b71 (diff)
Include a "wide" modifier for ROST patterns.
Diffstat (limited to 'tests/analysis/scan')
-rw-r--r--tests/analysis/scan/pyapi.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/analysis/scan/pyapi.py b/tests/analysis/scan/pyapi.py
index 006c17a..29e813b 100644
--- a/tests/analysis/scan/pyapi.py
+++ b/tests/analysis/scan/pyapi.py
@@ -92,6 +92,15 @@ class TestRostPythonAPI(ChrysalideTestCase):
self.assertEqual(source[::-1], transformed[0])
+ mod = find_token_modifiers_for_name('wide')
+ self.assertIsNotNone(mod)
+
+ source = b'ABC'
+ transformed = mod.transform(source)
+
+ self.assertEqual(source.decode('ascii'), transformed[0].decode('utf-16-le'))
+
+
mod = find_token_modifiers_for_name('base64')
self.assertIsNotNone(mod)