+
    SBi4                     <   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt	^ RI
Ht ^ RIHt ^ RIHtHt ^ RIHtHt ^ RIHtHtHtHtHtHtHtHtHtHt ^ RIt]P<                  ! RR7      R 4       t]P@                  PC                  R	4       ! R
 R4      4       t"R# )zTests for distutils.util.N)copy)	sysconfigutil)DistutilsByteCompileErrorDistutilsPlatformError)
byte_compilechange_rootcheck_environconvert_pathget_host_platformget_platformgrok_environment_errorrfc822_escapesplit_quoted	strtoboolT)autousec                    V P                  \        R \        P                  4       V P                  \        R\        P                  4       V P                  \        R\        P
                  4       V P                  \        R\        P                  4       V P                  \        P                  R\        P                  P                  4       V P                  \        P                  R\        P                  P                  4       V P                  \        P                  R\        P                  P                  4       V P                  \        R\        \        P                  4      4       R# )	nameplatformversionsepjoinisabs
splitdrive_config_varsN)setattrosr   sysr   r   r   pathr   r   r   r   r   r   )monkeypatchs   &J/usr/lib/python3.14/site-packages/setuptools/_distutils/tests/test_util.pyenvironmentr!      s    FBGG,Z6Y4E266*6"''--8rww/A/AB	>4	8N8N3OP    save_envc                   &  a  ] tR t^+t o R tR tR tR tR t]	P                  P                  R4      R 4       tR tR	 tRt]	P                  P!                  R
RR] R] R] 23RR] R23RRR] R] R] R] 23.4      R 4       tR tR tRtV tR# )TestUtilc           	     r   \         P                  ! R R4      ;_uu_ 4        \         P                  ! RR4      ;_uu_ 4        \        4       R8X  g   Q h RRR4       \         P                  ! RR4      ;_uu_ 4        \        4       R8X  g   Q h RRR4       RRR4       \         P                  ! RR	4      ;_uu_ 4        \        4       \        P                  ! 4       8X  g   Q h RRR4       R#   + '       g   i     L; i  + '       g   i     Lz; i  + '       g   i     L; i  + '       g   i     R# ; i)
os.namentzsys.versionz... [... (ARM64)]	win-arm64Nz... [... (ARM)]	win-arm32zsys.version_info)   	       finalr-   )mockpatchr   stdlib_sysconfigr   selfs   &r    test_get_host_platformTestUtil.test_get_host_platform-   s    ZZ	4((M+>??(*k999 @M+<==(*k999 > ) ZZ*,ABB$&*:*G*G*IIII CB @?== )( CBBsG    D C,	'D:C?	D<%D%,C<7D?D
DD"	%D6	c           	     >   \         P                  ! R R4      ;_uu_ 4        \         P                  P                  RRR/4      ;_uu_ 4        \        4       R8X  g   Q h RRR4       \         P                  P                  RRR/4      ;_uu_ 4        \        4       R8X  g   Q h RRR4       \         P                  P                  RRR	/4      ;_uu_ 4        \        4       R
8X  g   Q h RRR4       \         P                  P                  RRR/4      ;_uu_ 4        \        4       R8X  g   Q h RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     LS; i  + '       g   i     R# ; i)r'   r(   z
os.environVSCMD_ARG_TGT_ARCHx86win32Nx64z	win-amd64armr*   arm64r)   )r/   r0   dictr   r2   s   &r    test_get_platformTestUtil.test_get_platform7   s   ZZ	4((0De/LMM#~000 N0De/LMM#~444 N0De/LMM#~444 N0Dg/NOO#~444 P )(MMMMMMOO )((sk   +FD?	2FE	#2FE%	(2FE8	-F?E
FE"F%E50F8FFF	c                    \         P                  P                  R4      p\        R4      V8X  g   Q h\        \        P
                  ! R4      4      V8X  g   Q h\        R4      \         P                  8X  g   Q hR# ) z/home/to/my/stuff.N)rA   hometomystuff)r   r   r   r
   pathlibPathcurdir)r3   expecteds   & r    test_convert_pathTestUtil.test_convert_pathB   s]    66;;@A/0H<<<GLL)<=>(JJJC BII---r"   c                |   R \         n        R pV\         P                  n        R pV\         P                  n        \        RR4      R8X  g   Q h\        RR4      R8X  g   Q hR\         n        R	\         n        R
 pV\         P                  n        R pV\         P                  n        R pV\         P                  n        \        RR4      R8X  g   Q h\        RR4      R8X  g   Q hR\         n        \        P                  ! \        4      ;_uu_ 4        \        RR4       RRR4       R#   + '       g   i     R# ; i)posixc                     V ^ ,          R8H  # )r-   / r   s   &r    _isabs)TestUtil.test_change_root.<locals>._isabsL   s    7c>!r"   c                  $    R P                  V 4      # )rP   r   rR   s   *r    _join(TestUtil.test_change_root.<locals>._joinQ   s    88D>!r"   z/rootz/old/its/herez/root/old/its/herezits/herez/root/its/herer(   \c                 $    V P                  R 4      # )zc:\)
startswithrR   s   &r    rS   rT   ]   s    ??6**r"   c                 `    V P                  R 4      '       d   RV P                  R R4      3# RV 3# )zc:rA   )r[   replacerR   s   &r    _splitdrive.TestUtil.test_change_root.<locals>._splitdriveb   s1    t$$DLLr233:r"   c                  $    R P                  V 4      # )rY   rV   rR   s   *r    rW   rX   i   s    99T?"r"   zc:\rootzc:\old\its\herezc:\root\old\its\herezits\herezc:\root\its\here	BugsBunnyN)r   r   r   r   r   r   r   r   pytestraisesr   )r3   rS   rW   r^   s   &   r    test_change_rootTestUtil.test_change_rootH   s   	" 	" 7O48LLLL7J/3CCCC 	+ 	
 )	#  
$89=WW	
W:{37LLLL ]]122
K0 3222s   D**D;	c                    \         P                  P                  4        \        P                  P                  R R4       \        4        \        P                  R,          \        4       8X  g   Q hR# )HOMENPLAT)r   r	   cache_clearr   environpopr   r2   s   &r    test_check_environTestUtil.test_check_environz   sD    &&(


vt$zz&!\^333r"   zos.name != 'posix'c                   \         P                  P                  4        \        P                  P                  R R4       ^ RIpVP                  R4      p\        P                  P                  VRVR7      ;_uu_ 4        \        4        \        P                  R ,          R8X  g   Q h RRR4       \         P                  P                  4        \        P                  P                  R R4       \        P                  P                  VR\        R7      ;_uu_ 4        \        4        R \        P                  9  g   Q h RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)rg   N/home/distutilsgetpwuid)return_value)side_effect)NNNNNro   N)r   r	   ri   r   rj   rk   pwdstruct_passwdr/   r0   objectKeyError)r3   rs   results   &  r    test_check_environ_getpwuid$TestUtil.test_check_environ_getpwuid   s    &&(


vt$ "" $
  ZZsJVDDO::f%):::: E 	&&(


vt$ ZZsJHEEO+++ FE ED FEEs   >)E	"E	E	E-	c                .    \        R 4      . RO8X  g   Q hR# )z""one"" "two" 'three' \fourN)onetwothreefour)r   r2   s   &r    test_split_quotedTestUtil.test_split_quoted   s     <= B
 
 	
 
r"   c                ~    RpRpV F  p\        V4      '       d   K  Q h	  V F  p\        V4      '       g   K  Q h	  R# )yN)
r   YyesTruettruer   Onon1)	nnoffalseoff0OffNoN)r   )r3   r   r   r   r   s   &    r    test_strtoboolTestUtil.test_strtobool   s?    MDAQ<<<  A ||## r"   zgiven,wantedzhello
world
zhello
zworld
zhelloworldzhelloworldzI am a
poor
lonesome
header
zI am a
zpoor
z	lonesome
zheader
c                   \        V4      p\        P                  P                  RR^ R7      p\        P
                  ! 4       ;_uu_ 4       pRV R2p\        P                  ! V4      p\        P                  P                  WTR7      P                  V4       VP                  ^ 4       \        P                  ! V4      pRRR4       XX3 Fh  p	V	P                  4       R8X  g   Q hV	R	,          R
8X  g   Q h\        V	R,          P                  4       4      \        VP                  4       4      8X  d   Kh  Q h	  W28X  g   Q hR#   + '       g   i     L; i)a+  
We want to ensure a multi-line header parses correctly.

For interoperability, the escaped value should also "round-trip" over
`email.generator.Generator.flatten` and `email.message_from_*`
(see pypa/setuptools#4033).

The main issue is that internally `email.policy.EmailPolicy` uses
`splitlines` which will split on some control chars. If all the new lines
are not prefixed with spaces, the parser will interrupt reading
the current header and produce an incomplete value, while
incorrectly interpreting the rest of the headers as part of the payload.
TF)utf8mangle_from_max_line_lengthzheader: z
other-header: 42

payload
)policyNzpayload
zother-header42header)r   emailr   EmailPolicyioStringIOmessage_from_string	generator	Generatorflattenseekmessage_from_fileget_payloadset
splitlines)
r3   givenwantedresr   bufferraworigregenmsgs
   &&&       r    test_rfc822_escapeTestUtil.test_rfc822_escape   s   6 E")) * 

 [[]]fSE!@AC,,S1DOO%%f%<DDTJKKN++F3E  %=C??$333~&$...s8}//12c#..:J6KKKK	 ! }} ]s   A3E  E	c                   \         P                  pR \         n         \        P                  ! \        4      ;_uu_ 4        \        . 4       RRR4       V\         n        R#   + '       g   i     L; i  T\         n        i ; i)TN)r   dont_write_bytecoderb   rc   r   r   )r3   old_dont_write_bytecodes   & r    test_dont_write_bytecode!TestUtil.test_dont_write_bytecode   sX     #&"9"9"&	>899R  : '>C# :9 '>C#s"   "A3 A A3  A0	+A3 3B c                D    \        R 4      p\        V4      pVR8X  g   Q hR# )zUnable to find batch filez error: Unable to find batch fileN)OSErrorr   )r3   excr   s   &  r    test_grok_environment_error$TestUtil.test_grok_environment_error   s&    12$S)8888r"   rQ   Nz        )rA   rA   )__name__
__module____qualname____firstlineno__r4   r>   rK   rd   rl   rb   markskipifrx   r   r   indentparametrizer   r   r   __static_attributes____classdictcell__)__classdict__s   @r    r%   r%   +   s     J	5..1d4 [[,-, .,8
$ F[[ "Yvhbx#PQ6(%8926(&
6((6(S		
""H	>9 9r"   r%   )#__doc__r   email.generatoremail.policyr   r   rG   r   r   r1   unittest.mockr/   r   	distutilsr   distutils.errorsr   r   distutils.utilr   r   r	   r
   r   r   r   r   r   r   rb   fixturer!   r   usefixturesr%   rQ   r"   r    <module>r      s        	 	  
 $   % N    Q Q $G9 G9 %G9r"   