python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_mailcap.cpython-312.opt-2.pyc

Αe-vddlZddlZddlZddlZddlZddlmZddlmZejdZ	ejjdZdddd	d
dgdd
ddgddddddgdddgddddddddgdddgd d!dd"d#d$gd%dd&d'd(gd)d*dgd+d,dgd-d.dgd/d0dd1gd)d2dgd3
Z
eje
Zej!D]ZeD]Zej'd4Gd5d6ej(ZGd7d8ej(ZGd9d:ej(Zed;k(rej2yy)<N)	os_helper)warnings_helpermailcapzmailcap.txtz
moviemaker %sz""/usr/lib/Zmail/bitmaps/movie.xbm"z"Movie"zmovieplayer %s)composez
x11-bitmapdescriptionviewlinenoz?echo "This is \"%t\" but        is 50 \% Greek to me" \; cat %s)
copiousoutputr	r
audiocompose %s"An audio fragment"showaudio %seditrrr	r
mpeg_play %s
r	r
zps-to-terminal %s)
needsterminalr	r
zidraw %s)rr	r
zxdvi %s
extcompose %s4"A reference to data stored in an external location"Qshowexternal %s %{access-type} %{name} %{site}     %{directory} %{mode} %{server}
composetypedrrr	r
z?test "`echo     %{charset} | tr '[A-Z]' '[a-z]'`"  = iso-8859-8z)shownonascii iso-8859-8 -e richtext -p %s)testr
r	r
z
display %s	/usr/local/bin/showaudio %t
animate %sz
"cat %s | lp"zshowframe %s)printr	r
)
zapplication/x-moviez
application/*audio/basic
video/mpegzapplication/postscriptzapplication/x-dvimessage/external-bodyz
text/richtextzimage/x-xwindowdumpaudio/*video/*zapplication/framez	image/rgbr
c$eZdZdZdZdZdZy)HelperFunctionTestctj}|j|t|D]}|j|ttj5}d|vr#|djtj}n:ddg}tjj||d<tj}ddd|j|y#1swYxYw)NMAILCAPSz/testdir1/.mailcapz/testdir2/mailcap)rlistmailcapfilesassertIsInstanceliststrrEnvironmentVarGuardsplitospathsepjoinassertEqual)selfmcfilesmenvenv_mailcapss     E/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_mailcap.pytest_listmailcapfilesz(HelperFunctionTest.test_listmailcapfilesKs**,gt,	*A!!!S)	*

*
*
,	5S ":44RZZ@ 46IJ"$**//,"?J!224	5	
w/	5	5s
A"CC"cttd5}|jt5tj|}dddddd|j
ty#1swY(xYw#1swY,xYw)Nr)openMAILCAPFILEassertWarnsDeprecationWarningrreadmailcapfileassertDictEqualMAILCAPDICT_DEPRECATED)r=mcfds   rBtest_readmailcapfilez'HelperFunctionTest.test_readmailcapfile^sj
+s
#	1s!!"45
1++C0
1	1	
Q 67
1
1	1	1s!A0A$A0$A-	)A00A9cHddddddg}tjtd}|j||d}ddd	d
ddg}tjtd
|}|j||ddiddig}tjtd}|j||y)Nr&r'rrrr+rrrrrrr*r	)rlookupMAILCAPDICTassertListEqualrL)r=expectedactualkeys    rBtest_lookupzHelperFunctionTest.test_lookupes)R8+r:<\:Xv.. 1$9+ 	"#
]C@Xv.^,v|.DE 6EXv.c
gd}gddfgddfgddfgdd	fgd
dfddd
|gdfddd
|gdfg}|D]*}|jtj|d|d,y)N)zid=1znumber=2ztotal=3)rr-foo.txtr)echo foor-rZr[)zecho %sr-rZzecho foo.txt)echo %t	audio/wavrZzecho audio/wav)zecho \%tr-rZr\r-rZ
echo %{total}zecho 3rr)r<rsubst)r=plist
test_casestcs    rB
test_substzHelperFunctionTest.test_subst{s/(,
/<
.?
02BC
0)<)Y
6
Cy)U
;XF

	;BW]]BqE2BqE:	;rXN)__name__
__module____qualname__rCrOrWrcrXrBr0r0Is0&8/,
;rXr0ceZdZdZdZy)GetcapsTestctj5}t|d<tj	}|j|tdddy#1swYyxYw)Nr2)rr7rGrgetcapsrKrR)r=r@capss   rBtest_mock_getcapszGetcapsTest.test_mock_getcapssL
*
*
,	4)C
O??$D  {3	4	4	4s4AActj}|j|ttj	}|Dcgc]$}t
jj|s#|&}}|rb|jD]N\}}|j|t|j|t|D]}|j|tPy|ji|ycc}w)N)rrkr4dictr3r9pathexistsitemsr6r5r<)r=rlmailcapfilesrMexistingmcfileskves        rBtest_system_mailcapzGetcapsTest.test_system_mailcaps dD)//1*6N3"''..:M3NN**,
3A%%a-%%a.3A))!T23
3
R&Os$C%(C%N)rdrerfrmrxrgrXrBriris4'rXriceZdZdZej
ejdk(deje	jdk(dej
ejjddZdZd	Zy
)
FindmatchTestcVt}d}gd}dddddd}dd	d
}ddd
}d
ddddd}idgidf|dgidf|dgid|ff|ddgid|ff|ddgid|ff|ddgid|ff|ddgidf|dgd|id|z|ff|ddgd|id|z|ff|dgd|dd|ff|d gd|id!|ff|d"gd#|id$|ffg}|j|y)%NrZ)zaccess-type=defaultz	name=johnzsite=python.orgzdirectory=/tmpzmode=fooz
server=barrrrrrr$r%rr&r'rrrrrrr+NNzfoo/barzanimate /dev/nullr*rzaudiocompose /dev/nullrrfoobarr.filename)rVr~r]z"/usr/local/bin/showaudio audio/wavr,r`z?showexternal /dev/null default john python.org     /tmp foo bar)rR
_run_cases)	r=cfnamer`audio_basic_entryaudio_entryvideo_entry
message_entrycasess	         rBtest_findmatchzFindmatchTest.test_findmatchs
=&(0"
 =J+r:+Qdfg	

,
\2^R.
%8+$FG
'.FHY-Z[	
*B1IK\0]^

.5JL]4^_
)2|<^j%0<%3G2UV	
*%
 %'):
;
=
"
6#%6
7
9
%
 2K
@
B(
)u
OQ^
_
a%
,	
rXposixz!Requires 'test' command on systemvxworksz*'test' command is not supported on VxWorksz%'test' command needs process support.cdddigddigd}|ddgidddiff|ddgidfg}|j|y)Nr"ztest 1 -eq 1ztest 1 -eq 0)	test/pass	test/failrrr|)r)r=rlrs   rB	test_testzFindmatchTest.test_testsd &~67%~679K
("~?W.XYK
("l;	
	
rXcF|jtjd5tjddddg}|j	|dddd|jtjd5tjddd}|j	|dddd|jtjd	5tjtdd
}|j	|ddddy#1swYxYw#1swYmxYw#1swYyxYw)
Nz6Refusing to substitute parameter.*into a shell commandr^r]rZztotal=*z.Refusing to substitute MIME type.*into a shellr\r-zERefusing to use mailcap with filename.*Use a safe temporary filename.zfoo*.txt)r~r|)assertWarnsRegexrUnsafeMailcapInputr_r<	findmatchrR)r=unsafe_paramunsafe_mimetypeunsafe_filenames    rBtest_unsafe_mailcap_inputz'FindmatchTest.test_unsafe_mailcap_inputs"

"
"7#=#=$:;	1#==)4)2*36L
\40	1
"
"7#=#=$45	4&mmIy)LO_d3		4
"
"7#=#=$DE	<&//0;9C0EO
_l;
	<	<	1	1	4	4	<	<s#,C?5*D/D?DDD c	n|D]0}|jtj|di|d|d2y)Nrrr)r<rr)r=rrs   rBrzFindmatchTest._run_casess?	EAW..!=!=qtD	ErXN)rdrerfrunittest
skipUnlessr9nameskipIfsysplatformr"supporthas_subprocess_supportrrrrgrXrBrzrzs1fXG+-PQX__S\\Y.0\]X++/	^R"<0ErXrz__main__)copyr9rtest.supportr"rrrimport_deprecatedrrfindfilerGrRdeepcopyrLvalues
entry_listentrypopTestCaser0rirzrdmainrgrXrB<module>rs	
"(,/
+
+I
6ll##M2%<""	
	W
	$&. 	
	!B	/0':a	H)<	J	Lq	)*)Oe	
	X=
	
!	,-/1	=>"	-."Na	HI!	,-Y-b'{3(//1J
		(
?;**?;D'(##':fEH%%fERzHMMOrX