(self)
| 52 | self.assertEqual(ast, ['statement', 'a', 'b c']) |
| 53 | |
| 54 | def testContentsWhitespace(self): |
| 55 | ApacheConfigLexer = make_lexer() |
| 56 | ApacheConfigParser = make_parser() |
| 57 | |
| 58 | parser = ApacheConfigParser(ApacheConfigLexer(), start='contents') |
| 59 | |
| 60 | tests = ['a b', 'a b\n', '\n a b', '\n a b \n', '\n a \\\n b \n'] |
| 61 | for test in tests: |
| 62 | ast = parser.parse(test) |
| 63 | self.assertEqual(ast, ['contents', ['statement', 'a', 'b']]) |
| 64 | |
| 65 | def testHashComments(self): |
| 66 | text = """\ |
nothing calls this directly
no test coverage detected