示例#1
0
文件: tests.py 项目: the9000/stelm
 def testStrikeoutHyphenUnicode(self):
   s = u"нет-нет и да-да"
   f = Striker(s, 0)
   frags, next = f.apply()
   self.assertEqual(frags, [])
   self.assertEqual(next, 0)
示例#2
0
文件: tests.py 项目: the9000/stelm
 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"))
示例#3
0
文件: tests.py 项目: the9000/stelm
 def testStrikeoutHyphen(self):
   s = u"abc-def-ghi"
   f = Striker(s, 0)
   frags, next = f.apply()
   self.assertEqual(frags, [])
   self.assertEqual(next, 0)