Example #1
0
    def test_TryParagraphEnd_OneParagraphEndWithSection(self):
        (new_pos, new_line, paragraph_end) = mp._TryParagraphEnd('=', 0, 0)

        self.assertEqual(0, new_pos)
        self.assertEqual(mp.Token('paragraph-end', '', mp.SourcePos(0, 0, 0, 0)), paragraph_end)
Example #2
0
    def test_TryParagraphEnd_ComplexParagraphEnd3(self):
        (new_pos, new_line, paragraph_end) = mp._TryParagraphEnd('  \n\n\t  \n=', 0, 0)

        self.assertEqual(8, new_pos)
        self.assertEqual(mp.Token('paragraph-end', '  \n\n\t  \n', mp.SourcePos(0, 3, 0, 8)), paragraph_end)
Example #3
0
    def test_TryParagraphEnd_OneParagraphEndWithWS(self):
        (new_pos, new_line, paragraph_end) = mp._TryParagraphEnd('\n', 0, 0)

        self.assertEqual(1, new_pos)
        self.assertEqual(mp.Token('paragraph-end', '\n', mp.SourcePos(0, 1, 0, 1)), paragraph_end)