Beispiel #1
0
    def test_matches(self):
        p = symbol()
        full_match(p, 'simple')
        full_match(p, 'snake_case')
        full_match(p, 'lowerAndUpper')
        full_match(p, 'end_with_digit1')

        eq_(p('with_whitespace '), ('with_whitespace', ''))
Beispiel #2
0
 def test_fails(self):
     p = symbol()
     no_match(p, '1start_with_digit')
     no_match(p, '1hello')
     eq_(p('with space'), ('with', 'space'))