예제 #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"))