Lines Matching +full:bare +full:- +full:events
12 self.events = []
13 self.append = self.events.append
17 # Normalize the list of events so that buffer artefacts don't
21 for event in self.events:
24 L[-1] = ("data", L[-1][1] + event[1])
28 self.events = L
80 events = parser.get_events()
81 if events != expected_events:
82 self.fail("received events did not match expected events\n"
84 "\nReceived:\n" + pprint.pformat(events))
86 def _run_check_extra(self, source, events): argument
87 self._run_check(source, events, EventCollectorExtra)
111 <!--comment1a
112 -></foo><bar><<?pi?></foo<bar
113 comment1b-->
117 <!--comment2a-- --comment2b-->
127 ("comment", "comment1a\n-></foo><bar><<?pi?></foo<bar\ncomment1b"),
133 ("comment", "comment2a-- --comment2b"),
162 self._run_check("this < text > contains < bare>pointy< brackets", [
163 ("data", "this < text > contains < bare>pointy< brackets"),
192 self._run_check(["", "<!--abc-->"], output)
193 self._run_check(["<", "!--abc-->"], output)
194 self._run_check(["<!", "--abc-->"], output)
195 self._run_check(["<!-", "-abc-->"], output)
196 self._run_check(["<!--", "abc-->"], output)
197 self._run_check(["<!--a", "bc-->"], output)
198 self._run_check(["<!--ab", "c-->"], output)
199 self._run_check(["<!--abc", "-->"], output)
200 self._run_check(["<!--abc-", "->"], output)
201 self._run_check(["<!--abc--", ">"], output)
202 self._run_check(["<!--abc-->", ""], output)
224 # from http://www.w3.org/QA/2002/04/valid-dtd-list.html
226 ('HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" '
228 ('HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" '
230 ('html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '
231 '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"'),
232 ('html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" '
233 '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"'),
234 ('math PUBLIC "-//W3C//DTD MathML 2.0//EN" '
236 ('html PUBLIC "-//W3C//DTD '
238 '"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"'),
239 ('svg PUBLIC "-//W3C//DTD SVG 1.1//EN" '
241 'html PUBLIC "-//IETF//DTD HTML 2.0//EN"',
242 'html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"']
297 # see http://www.w3.org/TR/html5/tokenization.html#end-tag-open-state
299 html = ('<br></label</p><br></div end tmAd-leaderBoard><br></<h4><br>'
308 # comment because the first char after </ is not a-zA-Z
341 '<!-- not a comment --> ¬-an-entity-ref;',
347 '<!-- document.write("</scr" + "ipt>"); -->',
352 '\n<!-- //\nvar foo = 3.14;\n// -->\n',
354 u'<!-- \u2603 -->',
373 # The normal event collector normalizes the events in get_events,
374 # so we override it to return the original list of events.
377 return self.events
379 content = """<!-- not a comment --> ¬-an-entity-ref;
459 "<a a.b='v' c:d=v e-f=v>",
460 [("starttag", "a", [("a.b", "v"), ("c:d", "v"), ("e-f", "v")])])
485 "<a href=test'style='color:red;bad1'>test - bad1</a>"
486 "<a href=test'+style='color:red;ba2'>test - bad2</a>"
487 "<a href=test' style='color:red;bad3'>test - bad3</a>"
488 "<a href = test' style='color:red;bad4' >test - bad4</a>"
492 ('data', 'test - bad1'), ('endtag', 'a'),
494 ('data', 'test - bad2'), ('endtag', 'a'),
496 ('data', 'test - bad3'), ('endtag', 'a'),
498 ('data', 'test - bad4'), ('endtag', 'a')
540 html = ("<!-- I'm a valid comment -->"
541 '<!--me too!-->'
542 '<!------>'
543 '<!---->'
544 '<!----I have many hyphens---->'
545 '<!-- I have a > in the middle -->'
546 '<!-- and I have -- in the middle! -->')
549 ('comment', '--'),
551 ('comment', '--I have many hyphens--'),
553 ('comment', ' and I have -- in the middle! ')]
558 '<! not a comment either -->'
559 '<! -- close enough -->'
560 '<!><!<-- this was an empty comment>'
564 ('comment', ' not a comment either --'),
565 ('comment', ' -- close enough --'),
567 ('comment', '<-- this was an empty comment'),
573 html = ('<!--[if IE & !(lte IE 8)]>aren\'t<![endif]-->'
574 '<!--[if IE 8]>condcoms<![endif]-->'
575 '<!--[if lte IE 7]>pretty?<![endif]-->')
582 # these condcoms are missing the '--' after '<!' and before the '>'