MCPcopy Create free account
hub / github.com/etingof/apacheconfig / testOptionAndValueSet

Method testOptionAndValueSet

tests/unit/test_parser.py:182–213  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

180 )
181
182 def testOptionAndValueSet(self):
183 text = """\
184a b
185a = b
186a b
187a= b
188a =b
189a b
190a "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 = """\

Callers

nothing calls this directly

Calls 3

make_lexerFunction · 0.90
make_parserFunction · 0.90
parseMethod · 0.45

Tested by

no test coverage detected