(self)
| 112 | ) |
| 113 | |
| 114 | def testCStyleCommentsDisabled(self): |
| 115 | text = """\ |
| 116 | /*a*/ |
| 117 | /* |
| 118 | # b |
| 119 | */ |
| 120 | """ |
| 121 | options = { |
| 122 | 'ccomments': False |
| 123 | } |
| 124 | |
| 125 | ApacheConfigLexer = make_lexer(**options) |
| 126 | ApacheConfigParser = make_parser(**options) |
| 127 | |
| 128 | parser = ApacheConfigParser( |
| 129 | ApacheConfigLexer(), start='contents') |
| 130 | self.assertEqual( |
| 131 | parser.parse(text), [ |
| 132 | 'contents', |
| 133 | ['statement', '/*a*/'], |
| 134 | ['statement', '/*'], |
| 135 | ['comment', '# b'], |
| 136 | ['statement', '*/'] |
| 137 | ] |
| 138 | ) |
| 139 | |
| 140 | def testIncludes(self): |
| 141 | text = """\ |
nothing calls this directly
no test coverage detected