~washort/pymeta/trunk

« back to all changes in this revision

Viewing changes to pymeta/test/test_pymeta.py

  • Committer: Allen Short
  • Date: 2010-05-13 04:13:19 UTC
  • Revision ID: washort@allen-shorts-macbook-pro.local-20100513041319-vg0tquu9sp2zisxe
Extend args test to check more than one arg to rule

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
        """
281
281
        g = self.compile("""
282
282
              digit ::= ('0' | '1' | '2'):d => int(d)
283
 
              foo :x ::= (?(x > 1) '9' | ?(x <= 1) '8'):d => int(d)
284
 
              baz ::= <digit>:a <foo a>:b => [a, b]
 
283
              foo :x :ignored ::= (?(x > 1) '9' | ?(x <= 1) '8'):d => int(d)
 
284
              baz ::= <digit>:a <foo a None>:b => [a, b]
285
285
            """)
286
286
        self.assertEqual(g.baz("18"), [1, 8])
287
287
        self.assertEqual(g.baz("08"), [0, 8])