(self)
| 180 | ) |
| 181 | |
| 182 | def testOptionAndValueSet(self): |
| 183 | text = """\ |
| 184 | a b |
| 185 | a = b |
| 186 | a b |
| 187 | a= b |
| 188 | a =b |
| 189 | a b |
| 190 | a "b" |
| 191 | a = "b" |
| 192 | a = 'b' |
| 193 | """ |
| 194 | ApacheConfigLexer = make_lexer() |
| 195 | ApacheConfigParser = make_parser() |
| 196 | |
| 197 | parser = ApacheConfigParser(ApacheConfigLexer(), start='contents') |
| 198 | |
| 199 | ast = parser.parse(text) |
| 200 | self.assertEqual( |
| 201 | ast, [ |
| 202 | 'contents', |
| 203 | ['statement', 'a', 'b'], |
| 204 | ['statement', 'a', 'b'], |
| 205 | ['statement', 'a', 'b'], |
| 206 | ['statement', 'a', 'b'], |
| 207 | ['statement', 'a', 'b'], |
| 208 | ['statement', 'a', 'b'], |
| 209 | ['statement', 'a', 'b'], |
| 210 | ['statement', 'a', 'b'], |
| 211 | ['statement', 'a', 'b'] |
| 212 | ] |
| 213 | ) |
| 214 | |
| 215 | def testBlockWithOptions(self): |
| 216 | text = """\ |
nothing calls this directly
no test coverage detected