diff options
| author | 2024-06-22 21:19:42 -0400 | |
|---|---|---|
| committer | 2024-06-22 21:19:42 -0400 | |
| commit | 408cf4d7719de63b8175bd9b69a7484bc6dba1f8 (patch) | |
| tree | eb6ec27c12186e38a97673ec9a1332853aa44175 /test/test_formatter.py | |
| parent | 265fafbf1b3d468d4087a5229ca4bad0a651db23 (diff) | |
| parent | 80e39a8fc7de105510cbbdca8507f2a4b8c9e01d (diff) | |
Update upstream source from tag 'upstream/1.27.1'
Update to upstream version '1.27.1'
with Debian dir 786b4d48b451c0be3e4e14b3739202bb3965566e
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") |
