def test_label2(): check_succ_cont((char('a').label('777'), 'abc'), ('a'), 'bc') check_fail_msg((char('b').label('777'), 'abc'), '777', 'abc')
def test_pleft(): check_succ_cont((char('a') << char(')'), 'a)bc'), ('a'), 'bc') check_succ_cont((char('(') >> char('a') << char(')'), '(a)bc'), ('a'), 'bc')
def test_char(): check_succ_cont((char('['), '[abc]'), ('['), 'abc]') check_succ_cont((char('9'), '987654321'), ('9'), '87654321') check_type((char('a'), '[abc]'), ParseError, '[abc]')
def test_between(): check_succ_cont((between(char('['), string('abc'), char(']')), '[abc]'), 'abc', '')