mò %U²Ic@s•dkZdkZdkZdklZdeifd„ƒYZdefd„ƒYZdeifd„ƒYZ d„Z e d jo e ƒndS( N(s test_supporttEventCollectorcBsktZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z RS( NcCs,g|_|ii|_tii|ƒdS(N(tselfteventstappendtsgmllibt SGMLParsert__init__(R((t./data/zmath/lib/python2.4/test/test_sgmllib.pyR s cCsŒg}d}xp|iD]e}|d}||jo djno$d|dd|df|ds(R!R"R&(((RR#=stSGMLParserTestCasecBs tZeZd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(NcCsO|iƒ}y,x|D]}|i|ƒqW|iƒWn ‚nX|iƒS(N(Rt collectortparsertsourcetstfeedtcloseR(RR*R)R+((RRGs cCsiy|i|ƒ}Wndk}‚nX||jo/|idti|ƒdti|ƒƒndS(Ns8received events did not match expected events Expected: s Received: ( RRR*Rtsystexpected_eventstfailtpprinttpformat(RR*R/R.R((Rt check_eventsRs  cCsgtƒ}y|i|ƒ|iƒWntij on(X|id|t i |i ƒƒfƒdS(Ns+expected SGMLParseError for %r Received: %s( RR)R,R*R-RtSGMLParseErrorRR0R1R2R(RR*R)((Rtcheck_parse_error^s  cCs*d}|id|gd|fgƒdS(NsòDOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN' SYSTEM 'http://www.w3.org/TR/html401/strict.dtd' [ %paramEntity; ]sR(tinsideRR3(RR6((Rttest_doctype_decl_internaliscCs'd}|id|d|fgƒdS(Ns/DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN'sR(R6RR3(RR6((Rttest_doctype_decl_external|scCs&|idddddgfgƒdS( s7Make sure attribute names with underscores are acceptedsRtat has_undert_underN(R:R:(R;R;(RR3(R((Rttest_underscore_in_attrname‚scCs#|idddgfdgƒdS(s1Make sure tag names with underscores are acceptedsRR:RN(sendtags has_under(RR3(R((Rttest_underscore_in_tagnameŠscCs#|iddddgfgƒdS(s@Be sure quotes in unquoted attributes are made part of the valuesRR9threfs foo'bar"bazN(R>s foo'bar"baz(RR3(R((Rttest_quotes_in_unquoted_attrs’scCs2|idddgfd ddgfd gƒdS( s(Handling of XHTML-style empty start tagss
textRtbrRttexttiRN(sdatastext(sendtagRB(RR3(R((Rttest_xhtml_empty_tag™scCs|iddgƒdS(NsRsprocessing instruction(spisprocessing instruction(RR3(R((Rt test_processing_instruction_only¢scCs2|idddgfddgfddgƒdS(Ns
RR9tbR(sendtagR9(sendtagRE(RR3(R((Rttest_bad_nesting§scCs|iddgƒdS(Ns#this text & contains & ampersands &R(sdatas#this text & contains & ampersands &(RR3(R((Rttest_bare_ampersands¯scCs|iddgƒdS(Ns.this < text > contains < bare>pointy< bracketsR(sdatas.this < text > contains < bare>pointy< brackets(RR3(R((Rttest_bare_pointy_brackets´scCsbddd d ddgfg}|id|ƒ|id |ƒ|id |ƒ|id |ƒdS(NRR9REtvtctdtessss(RERI(RJRI(RKRI(RLRL(toutputRR3(RRM((Rttest_attr_syntax¹s cCs¸|iddddddgfgƒ|id ddddgfgƒd }d }d}d|||f}|id|ddd|fgfgƒ|iddddgfgƒdS(Ns'RR9REsxxx xxxRJsyyy yyyRKs xyz s ts$-_.+s!*'(),s;/?:@&=s+http://example.com:8080/path/to/file?%s%s%ssRLss rgb(1,2,3)(REsxxx xxx(RJsyyy yyy(RKs xyz (RERO(RJRO(R9s rgb(1,2,3)(RR3tsafetextratreservedturl(RRSRPRRRQ((Rttest_attr_valuesÂs ")cCs)|iddddd d gfgƒdS( NsRR9sa.bRIsc:dse-f(sa.bRI(sc:dRI(se-fRI(RR3(R((Rttest_attr_funky_namesÙscCs2|iddddgfdddgfgƒdS(NsRRR9R>shttp://[1080::8:800:200C:417A]/(shrefshttp://[1080::8:800:200C:417A]/(shrefshttp://[1080::8:800:200C:417A]/(RR3(R((Rttest_attr_value_ip6_urlÞs cCs#d}|i|ddd gƒdS( Ns(abcdefRtabcs unknown declsspacer type="block" height="25"tdef(sdataRW(s unknown declsspacer type="block" height="25"(sdataRX(R+RR3(RR+((Rttest_illegal_declarationsæscCsK|idddgfddgfgƒ|iddddgfgƒdS(NsRR9sR(sendtagR9(RR3(R((Rttest_weird_starttagsîs(cCs|idƒdS(Ns(RR5(R((Rttest_declaration_junk_charsøscCs,d}|i|dddd gfgƒdS( NsRtfoobartonet1ttwot2(R]R^(R_R`(R+RR3(RR+((Rttest_get_starttag_textûsc Csud}t|_|i|ddgfd dddgfddddgƒd }|i|ddgfddgƒdS(Nsb ¬-an-entity-ref; RR$Rs, ¬-an-entity-ref; Rtnotcdatat Rs comment s$ s (sdatas, ¬-an-entity-ref; (sendtagscdata(sdataRc(scomments comment (sdataRc(sendtagRb(sdatas (sendtagscdata(R+R#RR(R3(RR+((Rttest_cdata_contents  : cCs#d}|i|ddd gƒdS( Ns(abcdefRRWs unknown declsspacer type="block" height="25"RX(sdatasabc(s unknown declsspacer type="block" height="25"(sdatasdef(R+RR3(RR+((RRYscCsd}|i|dgƒdS(Ns-]>Rs*DOCTYPE doc [](sdecls*DOCTYPE doc [](R+RR3(RR+((Rttest_enumerated_attr_typescCsgd}ttidƒƒ}tiƒ}x9|i|ƒ}|i |ƒt |ƒ|joPq*q*WdS(Nissgml_input.htmli( tCHUNKtopent test_supporttfindfiletfRRtfptreadRR,tlen(RRkRjRRf((Rttest_read_chunks$s  cCsB|iddddgfgƒ|idddd gfgƒdS( Ns RR9REtt>(RERo(RERp(RR3(R((Rt_test_starttag_end_boundary6scCs+ddd*gfg}|idg|ƒ|iddg|ƒ|idd g|ƒ|id d g|ƒ|id d g|ƒ|iddg|ƒddd+gfg}|idg|ƒ|iddg|ƒ|iddg|ƒ|id dg|ƒ|idd g|ƒ|iddg|ƒd,g}|iddg|ƒ|iddg|ƒ|iddg|ƒ|iddg|ƒ|idd g|ƒ|id!d"g|ƒ|id#d$g|ƒ|id%d&g|ƒ|id'd(g|ƒ|id)dg|ƒ|iddg|ƒdS(-NRR9RERos ssssssb='>'>s='>'>s'>'>s'RRWROs s !--abc-->sssssss