summaryrefslogtreecommitdiff
path: root/tests/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-10-12 21:42:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-10-12 21:42:15 (GMT)
commitf393bbf6c8ca170dc17a41a386aef8bffab49591 (patch)
treedee24b1b58893415fbc8e94eb64d84aa78517533 /tests/analysis
parentbd7816732508f5e1262b2292779db313d8969184 (diff)
Implement two extra modifiers for ROST: "lower" and "upper".
Diffstat (limited to 'tests/analysis')
-rw-r--r--tests/analysis/scan/pyapi.py18
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)