Example #1
0
 def testStrikeoutHyphenUnicode(self):
   s = u"нет-нет и да-да"
   f = Striker(s, 0)
   frags, next = f.apply()
   self.assertEqual(frags, [])
   self.assertEqual(next, 0)
Example #2
0
 def testStrikeout(self):
   s = u"abc -def- ghi"
   f = Striker(s, 0)
   frags, next = f.apply()
   self.assertTrue(u"".join(frags).startswith(u"abc <s>def</s>"))
   self.assertEqual(next, s.index(" g"))
Example #3
0
 def testStrikeoutHyphen(self):
   s = u"abc-def-ghi"
   f = Striker(s, 0)
   frags, next = f.apply()
   self.assertEqual(frags, [])
   self.assertEqual(next, 0)