Esempio n. 1
0
 def testBOL(self):
   s = u'---\n b'
   f = HorizontalRuler(s, 0)
   frags, next = f.apply()
   self.assertEqual(u"".join(frags), u'<hr/>')
   self.assertEqual(next, s.index(" b"))
Esempio n. 2
0
 def testEOL(self):
   s = u'Over!\n---'
   f = HorizontalRuler(s, 0)
   frags, next = f.apply()
   self.assertEqual(u"".join(frags), u'Over!<hr/>')
   self.assertEqual(next, len(s))
Esempio n. 3
0
 def testBetweenManyLines(self):
   s = u'a\n\n----\n\nb'
   f = HorizontalRuler(s, 0)
   frags, next = f.apply()
   self.assertEqual(u"".join(frags), u'a\n<hr/>')
   self.assertEqual(next, s.index("\nb"))