diff options
| author | 2024-06-22 21:19:36 -0400 | |
|---|---|---|
| committer | 2024-06-22 21:19:36 -0400 | |
| commit | 80e39a8fc7de105510cbbdca8507f2a4b8c9e01d (patch) | |
| tree | bb5caa2f5fafc5116b8f89e659085ffbd8a918f2 /test/test_formatter.py | |
| parent | 1c28712d865e30ed752988ba0b6944882250b665 (diff) | |
New upstream version 1.27.1.upstream/1.27.1
Diffstat (limited to 'test/test_formatter.py')
| -rw-r--r-- | test/test_formatter.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_formatter.py b/test/test_formatter.py index 73e958c..e00af85 100644 --- a/test/test_formatter.py +++ b/test/test_formatter.py @@ -267,6 +267,18 @@ class TestFormatter(unittest.TestCase): "{a:Sort-reverse}", # starts with 'S', contains 'r' "['w', 'r', 'o', 'l', 'h', 'd', 'O', 'L', 'L', 'E', ' ']") + def test_specifier_conversions(self): + self._run_test("{a:Cl}" , "hello world") + self._run_test("{h:CHC}" , "Foo & Bar") + self._run_test("{l:CSulc}", "A, b, c") + + def test_specifier_limit(self): + self._run_test("{a:X20/ */}", "hElLo wOrLd") + self._run_test("{a:X10/ */}", "hElLo wO *") + + with self.assertRaises(ValueError): + self._run_test("{a:Xfoo/ */}", "hello wo *") + def test_chain_special(self): # multiple replacements self._run_test("{a:Rh/C/RE/e/RL/l/}", "Cello wOrld") |
