Ejemplo n.º 1
0
 def testEscapeInside(self):
   s = u"abc {{\n end with \}} and you're done \n}} aaa"
   f = BlockCodeFormatter(s, 0)
   frags, next = f.apply()
   self.assertEqual(u"".join(frags), u"abc<pre> end with }} and you're done </pre>")
   self.assertEqual(next, s.index("aaa"))
Ejemplo n.º 2
0
 def testOneLiner(self):
   s = u"abc {{\ndef ghi\n}}jkl"
   f = BlockCodeFormatter(s, 0)
   frags, next = f.apply()
   self.assertEqual(u"".join(frags), u"abc<pre>def ghi</pre>")
   self.assertEqual(next, s.index("jkl"))