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

Method testCStyleCommentsDisabled

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

Source from the content-addressed store, hash-verified

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 = """\

Callers

nothing calls this directly

Calls 3

make_lexerFunction · 0.90
make_parserFunction · 0.90
parseMethod · 0.45

Tested by

no test coverage detected