(self)
| 138 | ) |
| 139 | |
| 140 | def testIncludes(self): |
| 141 | text = """\ |
| 142 | include first.conf |
| 143 | <<include second.conf>> |
| 144 | """ |
| 145 | ApacheConfigLexer = make_lexer() |
| 146 | ApacheConfigParser = make_parser() |
| 147 | |
| 148 | parser = ApacheConfigParser( |
| 149 | ApacheConfigLexer(), start='contents') |
| 150 | |
| 151 | ast = parser.parse(text) |
| 152 | self.assertEqual( |
| 153 | ast, [ |
| 154 | 'contents', ['include', 'first.conf'], |
| 155 | ['include', 'second.conf'] |
| 156 | ] |
| 157 | ) |
| 158 | |
| 159 | def testApacheIncludesDisabled(self): |
| 160 | text = """\ |
nothing calls this directly
no test coverage detected