mò v Lc:@s!dZdZdZdZdkZdkZeiieiiei dƒƒZ eii e ƒdZ e eijoeii de ƒneii e ƒdZdkZdeifd„ƒYZdd gd dgdd gdd gdd gddgddgddgddgddgddgddgddgddggZddgdd gddgddgdd gdd gdd!gdd"gd#d$gd%dgdd&gd'd(gd)d*gdd+gd'd,gdd-gdd.gd/d0ggZd dgd1dgd2d3gd4d5gd6gd7d8gd9d8gd#d#gd:d;gd<dgd=dgd>dgd?dgd dgd dgd@gdAdBgdCgdDgdEgddgddgdFdgdCgdGgdHgdIgdJgdKgdLgdMdNgdOdPgdQgdRdgdSdSgdTdUgdVdWgdXgdYgdZgd[d\gd]d]gd^d_gd`dagdbgdcgdddegdfdggdhdigdjgdkgdlgdmgdngdodngdpgdqdngg9ZdrdsgdtduggZdvdwdxdydzgZdkZd{klZd|„Zed}joeƒeiƒndS(~s$Id$s'Joseph Walton s $Revision$s Copyright (c) 2004 Joseph WaltonNitUriTestcBstZRS(N(t__name__t __module__(((t8/web/script/rubys/feedvalidator.org/src/tests/testUri.pyRsshttp://example.com/shttp://example.comsHTTP://example.com/shttp://example.com:/shttp://example.com:80/shttp://Example.com/shttp://example.com/~smith/shttp://example.com/%7Esmith/shttp://example.com/%7esmith/shttp://example.com/%C3%87shttp://example.com/C%CC%A7stag:example.com,2004:TestsTAG:example.com,2004:Testsftp://example.com/sftp://EXAMPLE.COM/sftp://example.com:21/smailto:user@example.comsmailto:user@EXAMPLE.COMs ../%C3%87s ../C%CC%A7shttp://example.org/shttp://example.com/index.htmlsFTP://example.com/shttp://example.com:8080/shttp://example.com/INDEX.HTMLshttp://example.com/%7Esmithshttp://example.com/%2fsmith/s!http://user:password@example.com/s!http://USER:PASSWORD@example.com/shttp://example.com:xstag:EXAMPLE.COM,2004:Teststag:user@example.com,2004:Teststag:user@EXAMPLE.COM,2004:Teststag:example.com,2004:testsTag:example.com,2004:TESTsTag:example.com,2004-01:Teststag:USER@example.com,2004:Testsftp://example.com/testsmailto:USER@example.coms$mailto:user@example.com?subject=tests$mailto:user@example.com?subject=TESTshttp://EXAMPLE.COM/shttp://example.com/%7Ejaneshttp://example.com/~janeshttp://example.com/?q=1%2f2shttp://example.com/?q=1%2F2shttp://example.com/?q=1/2shttp://example.com/a/./bshttp://example.com/a/bshttp://example.com/a/../a/bs!http://User:Password@Example.com/s!http://User:Password@example.com/shttp://@example.com/shttp://@Example.com/shttp://:@example.com/shttp://:@Example.com/s%http://www.w3.org/2000/01/rdf-schema#shttp://example.com/?q=C%CC%A7shttp://example.com/?q=%C3%87shttp://example.com/?q=%E2%85%A0shttp://example.com/?uhttp://example.com/%C3%87sftp://Example.Com:21/s)ldap://[2001:db8::7]/c=GB?objectClass?onesmailto:John.Doe@example.coms&news:comp.infosystems.www.servers.unixstel:+1-816-555-1212stelnet://192.0.2.16:80/s3urn:oasis:names:specification:docbook:dtd:xml:4.1.2shttp://example.com:081/shttp://example.com:81/s/test#test#tests/test#test%23tests http://com./shttp://example.com./shttp://www.example.com//a//shttp://www.example.com/./a//shttp://www.example.com/a//shttp://www.example.com//a/./shttp://www.example.com//a/shttp://example.com/%2F/s6aa1+-.:///?a1-._~!$&'()*+,;=:@/?#a1-._~!$&'()*+,;=:@/?shttp://example.com/?a+bshttp://a/b/c/../../../../gs http://a/gs/.foos /foo/bar/.s /foo/bar/s /foo/bar/..s/foo/s http:teststag:sfile://sfile:///stelnet://example.com:23/stelnet://example.com/sx://:@a/sx://a/s"tag:www.stanleysy.com,2005://1.119s,tag:timothy@hpl.hp.com,2001:web/externalHomes"http://xxx/read?id=abc%26x%3Dz&x=ys&tag:www.stanleysy.com,2005:%2F%2F1.119s2http://[fe80::290:4bff:fe1e:4374]/tests/atom/ipv6/s5http://[fe80::290:4bff:fe1e:4374]:80/tests/atom/ipv6/s7http://[fe80::290:4bff:fe1e:4374]:8080/tests/atom/ipv6/s3http://[fe80::290:4bff:fe1e:4374]:/tests/atom/ipv6/shttp://example.com/\/shttp://example.com/%5C/shttp://example.com/?a bshttp://example.com/?a%20bs#http://example.com/?q=%C7foo/../bars ./http://s./\/s1http://fe80::290:4bff:fe1e:4374]/tests/atom/ipv6/s1http://[fe80::290:4bff:fe1e:4374/tests/atom/ipv6/(srfc2396c s{d} xrtD]j} | d7} d„‰| d| d‡d†}d| dd| d|_ttdt| ƒ|ƒq Wxrt D]j} | d7} d„‰| d| d‡d †}d| dd | d|_ttdt| ƒ|ƒq‚Wx—t t D]‹} | d7} | d} t| ƒdjo| d}n| }d „‰| |‡d †}d| d ||_ttdt| ƒ|ƒqûWx[tD]S}| d7} d„‰|‡d†}d|d|_ttdt| ƒ|ƒq‘Wtiiƒ‰xntt t D]^} | d7} ‡d†‰| d‡d†}d| dd|_ttdt| ƒ|ƒqWtiƒitƒS(NiicCs,|itii|ƒtii|ƒƒdS(N(tselft assertEqualt feedvalidatorturitUritatb(RR R ((RttstEqual¯scsˆ|||ƒS(N(R RR R (RR R (R (Rt±ssTest s == ttestcCs,|itii|ƒtii|ƒƒdS(N(RtassertNotEqualRRRR R (RR R ((Rt tstDifferent·scsˆ|||ƒS(N(RRR R (RR R (R(RR ¹ss != cCs3tii|ƒ}|i||dt|ƒƒdS(NsBecame: ( RRt canonicalFormR tcfRRR tstr(RR R R((RttstCanonicalFormÄscsˆ|||ƒS(N(RRR R (RR R (R(RR Çss becomes cCs |itii|ƒdƒdS(N(Rt assertEqualsRRRR tNone(RR ((RttstCanFindCanonicalFormÍscs ˆ||ƒS(N(RRR (RR (R(RR Ïss cannot be canonicalisedcs|iˆii|ƒƒdS(N(Rt assertTruetr2t rfc2396_retmatchR (RR (R(Rt tstMatchesRe×scs ˆ||ƒS(N(RRR (RR (R(RR Ùss) is matched by the URI regular expression(tit testsEqualttR tfunct__doc__tsetattrRRttestsDifferentRttestsCanonicalttestNormalisableBadUristotlentcRt testsInvalidR RRt validatorstrfc2396RRtunittestt TestLoadertloadTestsFromTestCase( RR RRRRR R'RRR%R((RR RRRRRtbuildTestSuite«sT            t__main__(R t __author__t __version__t __copyright__tostsystpathtabspathtdirnametargvtcurdirtsplittsrcdirtinserttbasedirR+tTestCaseRRR"R#R$R(tfeedvalidator.uriRtfeedvalidator.validatorsR*R.Rtmain(R2RR(R+R=R#R0R4R$R*RR9R.RR"R;R1R3((Rt?s.% „¨ÿÀQ   4