コード例 #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)