%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib64/python2.7/site-packages/tornado/test/
Upload File :
Create Path :
Current File : //lib64/python2.7/site-packages/tornado/test/escape_test.pyc

�
��L]c&@�s�ddlmZmZmZmZddlZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZddlmZmZddlmZdied�fdied	�fd
ied�fdied
�fdied�fdied�fdied�fdied�fdied�fdied�fdied�fdied�fdied�fd ied!�fd"ied#�fd$ied%�fd&ied'�fd(id)d*gd+6ed,�fd-id*gd+6ed.�fd/ied0�fd1ied2�fd3ied4�fd5ied6�fd7id)d8gd+6ed9�fed:�ied;�fd<ied=�fd>ied?�fd>ied@6ed>�fdAied@6edB6edC�fdDiedB6edE�fdFiedG�fdFidHgd+6edI�fdJidKdL6edM�fdNidO�dL6edP�fdJidQ�dL6edM�fg#ZdRejfdS��YZdS(Ti(tabsolute_importtdivisiontprint_functiontwith_statementN(
tutf8txhtml_escapetxhtml_unescapet
url_escapeturl_unescapet
to_unicodetjson_decodetjson_encodetsqueezetrecursive_unicode(tutunicode_type(tunittestshello http://world.com/!s8hello <a href="http://world.com/">http://world.com/</a>!s0hello http://world.com/with?param=true&stuff=yessqhello <a href="http://world.com/with?param=true&amp;stuff=yes">http://world.com/with?param=true&amp;stuff=yes</a>s>http://url.com/w(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaas]<a href="http://url.com/w">http://url.com/w</a>(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaas>http://url.com/withmany.......................................sd<a href="http://url.com/withmany">http://url.com/withmany</a>.......................................s;http://url.com/withmany((((((((((((((((((((((((((((((((((a)sa<a href="http://url.com/withmany">http://url.com/withmany</a>((((((((((((((((((((((((((((((((((a)shttp://foo.com/blah_blahs?<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>shttp://foo.com/blah_blah/sA<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>s)(Something like http://foo.com/blah_blah)sP(Something like <a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>)s$http://foo.com/blah_blah_(wikipedia)sW<a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>s+http://foo.com/blah_(blah)_(wikipedia)_blahse<a href="http://foo.com/blah_(blah)_(wikipedia)_blah">http://foo.com/blah_(blah)_(wikipedia)_blah</a>s5(Something like http://foo.com/blah_blah_(wikipedia))sh(Something like <a href="http://foo.com/blah_blah_(wikipedia)">http://foo.com/blah_blah_(wikipedia)</a>)shttp://foo.com/blah_blah.s@<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>.shttp://foo.com/blah_blah/.sB<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>.s<http://foo.com/blah_blah>sG&lt;<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>&gt;s<http://foo.com/blah_blah/>sI&lt;<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>&gt;shttp://foo.com/blah_blah,s@<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>,s&http://www.example.com/wpstyle/?p=364.sZ<a href="http://www.example.com/wpstyle/?p=364">http://www.example.com/wpstyle/?p=364</a>.srdar://1234thttptrdartpermitted_protocolss%<a href="rdar://1234">rdar://1234</a>s
rdar:/1234s#<a href="rdar:/1234">rdar:/1234</a>s'http://userid:password@example.com:8080s]<a href="http://userid:password@example.com:8080">http://userid:password@example.com:8080</a>shttp://userid@example.comsA<a href="http://userid@example.com">http://userid@example.com</a>shttp://userid@example.com:8080sK<a href="http://userid@example.com:8080">http://userid@example.com:8080</a>s"http://userid:password@example.comsS<a href="http://userid:password@example.com">http://userid:password@example.com</a>sFmessage://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3etmessages�<a href="message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e">message://%3c330e7f8409726r6a4ba78dkf1fd71420c1bf6ff@mail.gmail.com%3e</a>shttp://\u27a1.ws/\u4a39s=<a href="http://\u27a1.ws/\u4a39">http://\u27a1.ws/\u4a39</a>s<tag>http://example.com</tag>sJ&lt;tag&gt;<a href="http://example.com">http://example.com</a>&lt;/tag&gt;sJust a www.example.com link.sAJust a <a href="http://www.example.com">www.example.com</a> link.trequire_protocols:A http://reallylong.com/link/that/exceedsthelenglimit.htmltshortens�A <a href="http://reallylong.com/link/that/exceedsthelenglimit.html" title="http://reallylong.com/link/that/exceedsthelenglimit.html">http://reallylong.com/link...</a>s6A http://reallylongdomainnamethatwillbetoolong.com/hi!s�A <a href="http://reallylongdomainnamethatwillbetoolong.com/hi" title="http://reallylongdomainnamethatwillbetoolong.com/hi">http://reallylongdomainnametha...</a>!s/A file:///passwords.txt and http://web.com linksLA file:///passwords.txt and <a href="http://web.com">http://web.com</a> linktfilesSA <a href="file:///passwords.txt">file:///passwords.txt</a> and http://web.com linkswww.external-link.comsrel="nofollow" class="external"textra_paramss`<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a>s;www.external-link.com and www.internal-link.com/blogs extracC�s|jd�rdSdS(Nshttp://www.internal-link.comsclass="internal"srel="nofollow" class="external"(t
startswith(thref((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyt<lambda>}ss�<a href="http://www.external-link.com" rel="nofollow" class="external">www.external-link.com</a> and <a href="http://www.internal-link.com/blogs" class="internal">www.internal-link.com/blogs</a> extracC�sdS(Ns%    rel="nofollow" class="external"  ((R((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyR�stEscapeTestCasecB�skeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(cC�sCx<tD]4\}}}tjj||�}|j||�qWdS(N(t
linkify_teststtornadotescapetlinkifytassertEqual(tselfttexttkwargsthtmltlinked((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_linkify�scC�s�dtd�td�fdd
dtd�td�fdg}xX|D]P\}}|jtt|��t|��|jt|�tt|���qFWdS(Ns<foo>s&lt;foo&gt;s<>&"'s&lt;&gt;&amp;&quot;&#39;s&amp;s	&amp;amp;s<\u00e9>s&lt;\u00e9&gt;s<é>s
&lt;é&gt;(s<foo>s&lt;foo&gt;(s<foo>s&lt;foo&gt;(s<>&"'s&lt;&gt;&amp;&quot;&#39;(s&amp;s	&amp;amp;(s<é>s
&lt;é&gt;(RR!RRR(R"ttestst	unescapedtescaped((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_xhtml_escape�s	"cC�sXd
dddtd�fd
ddg}x*|D]"\}}|j|t|��q.WdS(Nsfoo&#32;barsfoo barsfoo&#x20;barsfoo&#X20;bars
foo&#xabc;barsfoo\u0abcbarsfoo&#xyz;bars	foo&#;bars
foo&#x;bar(sfoo&#32;barsfoo bar(sfoo&#x20;barsfoo bar(sfoo&#X20;barsfoo bar(sfoo&#xyz;barsfoo&#xyz;bar(s	foo&#;bars	foo&#;bar(s
foo&#x;bars
foo&#x;bar(RR!R(R"R(R*R)((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_xhtml_unescape_numeric�s	cC�svtd�jd�dftd�jd�dftd�dfg}x*|D]"\}}|jt|�|�qLWdS(Ns\u00e9Rs%C3%A9tlatin1s%E9(RtencodeR!R(R"R(R)R*((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_url_escape_unicode�s
cC�s�dtd�dfdtd�dfdttd��dfg}xU|D]M\}}}|jtt|�|�|�|jtt|�|�|�qIWdS(Ns%C3%A9s\u00e9Rs\u00c3\u00a9R-(RRtNoneR!RR	(R"R(R*R)tencoding((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_url_unescape_unicode�scC�s�d}d}d}|jt|�|�|jt|dt�|�|jt|�|�|jt|dt�|�|jt|dd�t|��|jt|dddt�t|��dS(Ns+ #%s
%2B+%23%25s%2B%20%23%25tplusR1(R!RtFalseRR0R(R"R)tplus_escapedR*((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_url_escape_quote_plus�s
cC�sB|jttd��t�|jtttd���t�dS(Ntfoo(R!ttypeRtstrRR(R"((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_escape_return_types�scC�sj|jtd�td��|jttd��td��|jtttd���td��dS(Ns"foo"R7s"\u00e9"s\u00e9(R!R
RR(R"((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_json_decode�s"cC�s||jtttd���td��ttkrx|jttttd����td��|jttd�ndS(Ns\u00e9s�(	R!R
RRtbytesR9RtassertRaisestUnicodeDecodeError(R"((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_json_encode�s(.cC�s&|jttd��td��dS(Ns&sequences     of    whitespace   charsssequences of whitespace chars(R!RR(R"((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_squeeze�scC�s�iidd6d6ddgd6dd6dd6}|jt|d�itd�td�6�|jt|d�td�td�g�|jt|d�td�td�f�|jt|d�td��dS(NtbarR7tdicttlistttupleR<(sfooRA(R!R
R(R"R(((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyttest_recursive_unicode�s

-,,(
t__name__t
__module__R'R+R,R/R2R6R:R;R?R@RE(((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyR�s			
		
	
						(t
__future__RRRRttornado.escapeRRRRRRR	R
RRR
ttornado.utilRRttornado.test.utilRtTrueRtTestCaseR(((s>/usr/lib64/python2.7/site-packages/tornado/test/escape_test.pyt<module>s�"F








Zerion Mini Shell 1.0