(self)
| 213 | ) |
| 214 | |
| 215 | def testBlockWithOptions(self): |
| 216 | text = """\ |
| 217 | <a> |
| 218 | #a |
| 219 | a = "b b" |
| 220 | # a b |
| 221 | a = "b b" |
| 222 | </a>""" |
| 223 | ApacheConfigLexer = make_lexer() |
| 224 | ApacheConfigParser = make_parser() |
| 225 | |
| 226 | parser = ApacheConfigParser( |
| 227 | ApacheConfigLexer(), start='block') |
| 228 | |
| 229 | ast = parser.parse(text) |
| 230 | self.assertEqual( |
| 231 | ast, [ |
| 232 | 'block', ('a',), |
| 233 | ['contents', |
| 234 | ['comment', '#a'], |
| 235 | ['statement', 'a', 'b b'], |
| 236 | ['comment', '# a b'], |
| 237 | ['statement', 'a', 'b b']], 'a' |
| 238 | ] |
| 239 | ) |
| 240 | |
| 241 | def testNestedBlock(self): |
| 242 | text = """\ |
nothing calls this directly
no test coverage detected