Commits

Mike Orr  committed 09cec19

Add test for highlight() with literal text.

  • Participants
  • Parent commits 33d9db2

Comments (0)

Files changed (1)

File tests/test_tools.py

             highlight("The cat in the hat.", "at", class_=None,
                 style="color:red"))
 
+    def test_highlight_literal(self):
+        eq_(literal(u'The &lt;red&gt; c<strong class="highlight">at</strong>.'),
+            highlight("The <red> cat.", "at"))
+        eq_(literal(u'The <red> c<strong class="highlight">at</strong>.'),
+            highlight(literal("The <red> cat."), "at"))
+
 
 if __name__ == '__main__':
     suite = map(unittest.makeSuite, [