diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-10-12 21:42:15 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-10-12 21:42:15 (GMT) |
commit | f393bbf6c8ca170dc17a41a386aef8bffab49591 (patch) | |
tree | dee24b1b58893415fbc8e94eb64d84aa78517533 /tests/analysis/scan | |
parent | bd7816732508f5e1262b2292779db313d8969184 (diff) |
Implement two extra modifiers for ROST: "lower" and "upper".
Diffstat (limited to 'tests/analysis/scan')
-rw-r--r-- | tests/analysis/scan/pyapi.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/analysis/scan/pyapi.py b/tests/analysis/scan/pyapi.py index 29e813b..5c31c82 100644 --- a/tests/analysis/scan/pyapi.py +++ b/tests/analysis/scan/pyapi.py @@ -92,6 +92,24 @@ class TestRostPythonAPI(ChrysalideTestCase): self.assertEqual(source[::-1], transformed[0]) + mod = find_token_modifiers_for_name('lower') + self.assertIsNotNone(mod) + + source = b'AbC' + transformed = mod.transform(source) + + self.assertEqual(source.lower(), transformed[0]) + + + mod = find_token_modifiers_for_name('upper') + self.assertIsNotNone(mod) + + source = b'AbC' + transformed = mod.transform(source) + + self.assertEqual(source.upper(), transformed[0]) + + mod = find_token_modifiers_for_name('wide') self.assertIsNotNone(mod) |