diff options
| author | 2025-09-16 02:12:49 -0400 | |
|---|---|---|
| committer | 2025-09-16 02:12:49 -0400 | |
| commit | 3b7f8716690b7aa1994a9cb387bbc7215e01a4ed (patch) | |
| tree | 1009e66478f4f0a64324acd92e0cc8709eb5f90f /test/test_formatter.py | |
| parent | 243b2597edb922fe7e0b0d887e80bb7ebbe72ab7 (diff) | |
New upstream version 1.30.7.upstream/1.30.7
Diffstat (limited to 'test/test_formatter.py')
| -rw-r--r-- | test/test_formatter.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test_formatter.py b/test/test_formatter.py index 8b35a2b..01e3a88 100644 --- a/test/test_formatter.py +++ b/test/test_formatter.py @@ -46,7 +46,8 @@ class TestFormatter(unittest.TestCase): "h": "<p>foo </p> & bar <p> </p>", "H": """<p> <a href="http://www.example.com">Lorem ipsum dolor sit amet</a>. - Duis aute irure <a href="http://blog.example.org">dolor</a>. + Duis aute irure <a href="http://blog.example.org/lorem?foo=bar"> + http://blog.example.org</a>. </p>""", "u": "'< / >'", "t": 1262304000, @@ -78,6 +79,7 @@ class TestFormatter(unittest.TestCase): self._run_test("{n!H}", "") self._run_test("{h!R}", []) self._run_test("{H!R}", ["http://www.example.com", + "http://blog.example.org/lorem?foo=bar", "http://blog.example.org"]) self._run_test("{a!s}", self.kwdict["a"]) self._run_test("{a!r}", f"'{self.kwdict['a']}'") @@ -176,6 +178,11 @@ class TestFormatter(unittest.TestCase): self._run_test("{l[0]}" , "a") self._run_test("{a[6]}" , "w") + def test_indexing_negative(self): + self._run_test("{l[-1]}" , "c") + self._run_test("{a[-7]}" , "o") + self._run_test("{a[-0]}" , "h") # same as a[0] + def test_dict_access(self): self._run_test("{d[a]}" , "foo") self._run_test("{d['a']}", "foo") |
