Ejemplo n.º 1
0
    def test_eat_line(self):
        SRC = SourceString('hello\nworld')

        SRC.eat_line()
        assert SRC.row == 2
        assert SRC.col == 0
        assert SRC.get_char() == 'w'

        SRC.eat_line()
        assert SRC.row == 2
        assert SRC.col == 5
        assert SRC.get_char() == ''