コード例 #1
0
ファイル: tests.py プロジェクト: the9000/stelm
 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"))
コード例 #2
0
ファイル: tests.py プロジェクト: the9000/stelm
 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))
コード例 #3
0
ファイル: tests.py プロジェクト: the9000/stelm
 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"))