HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib64/python3.6/test/__pycache__/test_html.cpython-36.pyc
3


 \��@s:dZddlZddlZGdd�dej�Zedkr6ej�dS)z&
Tests for the html module functions.
�Nc@seZdZdd�Zdd�ZdS)�	HtmlTestscCs*|jtjd�d�|jtjdd�d�dS)Nz'<script>"&foo;"</script>'z>&#x27;&lt;script&gt;&quot;&amp;foo;&quot;&lt;/script&gt;&#x27;Fz*'&lt;script&gt;"&amp;foo;"&lt;/script&gt;')�assertEqual�html�escape)�self�r�!/usr/lib64/python3.6/test_html.py�test_escape
s
zHtmlTests.test_escapecs�ddddg�d���fdd�}���fdd	�}|d
d
�|dd�|dd�x(dnD] }|||�||d|d�qRWddddddddddddg}xntdddd d!d"gd#d$d%d
d&d'g�D]H\}}x>|D]6}||||�x"doD]}||||||�q�Wq�Wq�WxdpD]}	||	d/��qWxdqD]}	||	d8��q"Wx*td9d:d;d<gd=�D]\}}
|||
��qJW|d>d/�|d?d@�|dAd/�xdrD]}||dF��q�WxdsD]}||dK��q�Wx.dtD]&}||dPdQ�||ddPdQ��q�WxduD]}||d
��q�WxdvD]}|||��qW|dXdX�|dYdZ�|d[d\�|d]d^�|d_d`�|dadb�|dcdd�|dedf�|dgdg�|dhdidjdi�|dkdl�|dmdm�dS)wNz&#%dz&#%d;z&#x%xz&#x%x;z$unescape(%r) should have returned %rcs"�jtj|�|�||fd�dS)N)�msg)rr�unescape)�text�expected)�errmsgrrr�checksz&HtmlTests.test_unescape.<locals>.checkcs8x2�D]*}||}�jtj|�|�||fd�qWdS)N)r
)rrr)�numr
�formatr)r�numeric_formatsrrr�	check_nums
z*HtmlTests.test_unescape.<locals>.check_numzno character referencesz&
&	& &&z&0 &9 &a &0; &9; &a;�&�&#�&#x�&#X�&#y�&#xy�&#Xy�;z&#%07dz&#%07d;z&#x%06xz&#x%06x;z&#x%Xz&#x%06Xz&#X%x;z&#X%06x;�A�a�"�&i&i4�A�a�"u☃u􁈴� �X���������u�����������
���u	
€•r�	�	l�N�Zo�&quot;;�&#34;;�&#x22;;�&#X22;;z";�&quot;quot;�
&#34;quot;�&#x22;quot;�&#X22;quot;z"quot;�&quot�&#34�&#x22�&#X22�z"""�&amp�&amp;�&AMP�&AMP;�&Amp�&Amp;z&svadilfari;z&notitu¬itz&notit;u¬it;z&notinu¬inz&notin;u∉z,&notReallyAnExistingNamedCharacterReference;u*¬ReallyAnExistingNamedCharacterReference;z!&CounterClockwiseContourIntegral;u∳z&acE;u∾̳z&acEz&#123; iz{ z2&Eacuteric&Eacute;ric&alphacentauri&alpha;centauriu"ÉricÉric&alphacentauriαcentauriz&co;)rrrrrrr)r#r$)r%r&r'r(r))r*r+r,r-r.r/r0r1)r9r:r;r<)r=r>r?r@)rArBrCrD)rFrGrHrI)rJrK)�zip)rrr�xZformatsr�char�s�endZcpZch�er)rrrr�
test_unescapesj






"

















zHtmlTests.test_unescapeN)�__name__�
__module__�__qualname__r	rRrrrrr	sr�__main__)�__doc__rZunittestZTestCaserrS�mainrrrr�<module>s
]