diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/utils/html.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regressiontests/utils/html.py b/tests/regressiontests/utils/html.py index 434873b9e0..389ae8ec75 100644 --- a/tests/regressiontests/utils/html.py +++ b/tests/regressiontests/utils/html.py @@ -34,6 +34,17 @@ class TestUtilsHtml(unittest.TestCase): # Verify it doesn't double replace &. self.check_output(f, '<&', '<&') + def test_format_html(self): + self.assertEqual( + html.format_html(u"{0} {1} {third} {fourth}", + u"< Dangerous >", + html.mark_safe(u"<b>safe</b>"), + third="< dangerous again", + fourth=html.mark_safe(u"<i>safe again</i>") + ), + u"< Dangerous > <b>safe</b> < dangerous again <i>safe again</i>" + ) + def test_linebreaks(self): f = html.linebreaks items = ( |
