Home | History | Annotate | Download | only in tests
      1 import os
      2 import antlr3
      3 import testbase
      4 import unittest
      5 
      6 class t019lexer(testbase.ANTLRTest):
      7     def setUp(self):
      8         self.compileGrammar()
      9         
     10 
     11     def testValid(self):
     12         inputPath = os.path.splitext(__file__)[0] + '.input'
     13         stream = antlr3.StringStream(open(inputPath).read())
     14         lexer = self.getLexer(stream)
     15 
     16         while True:
     17             token = lexer.nextToken()
     18             if token.type == antlr3.EOF:
     19                 break
     20 
     21 if __name__ == '__main__':
     22     unittest.main()
     23