+
    Bi5                         ^ RI t ^ RIt^ RIHtHtHtHtHt  ! R R]P                  4      t	 ! R R]P                  4      t
R# )    N)	_keynames_escapes
parse_keyscompile_keymapKeySpecErrorc                   P   a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	tV tR
# )TestParseKeysc                >   \         P                  \         P                  ,            Uu. uF  qV.3NK	  	  ppV FG  w  r4V P                  V RV 24      ;_uu_ 4        V P	                  \        V4      V4       RRR4       KI  	  R# u upi   + '       g   i     Kc  ; i)zUEnsure that single ascii characters or single digits are parsed as single characters. should be parsed as N)stringascii_lettersdigitssubTestassertEqualr   )selfkey
test_casestest_keyexpected_keyss   &    3/usr/lib/python3.14/test/test_pyrepl/test_keymap.pytest_single_character#TestParseKeys.test_single_character   s    .4.B.BV]].RS.RsSEl.R
S'1#H
*?OPP  H!5}E QP (2 TPPPs   BBBc                2   \         P                  ! 4        UUu. uF  w  rRV R2V.3NK  	  pppV FG  w  rEV P                  V RV 24      ;_uu_ 4        V P                  \	        V4      V4       RRR4       KI  	  R# u uppi   + '       g   i     Kd  ; i)zEnsure that keynames are parsed to their corresponding mapping.

A keyname is expected to be of the following form: \<keyname> such as \<left>
which would get parsed as "left".
z\<>r   N)r   itemsr   r   r   )r   keynameparsed_keynamer   r   r   s   &     r   test_keynamesTestParseKeys.test_keynames   s     [dZiZiZklZk?VwWIQ'.)9:Zk
l'1#H
*?OPP  H!5}E QP (2 mPPPs   A?BBc                0   \         P                  ! 4        UUu. uF  w  rRV 2V.3NK  	  pppV FG  w  rEV P                  V RV 24      ;_uu_ 4        V P                  \	        V4      V4       RRR4       KI  	  R# u uppi   + '       g   i     Kd  ; i)zIEnsure that escaping sequences are parsed to their corresponding mapping.\r   N)r   r   r   r   r   )r   escapeparsed_escaper   r   r   s   &     r   test_escape_sequences#TestParseKeys.test_escape_sequences   s    T\TbTbTdeTd;P6F8}}o6Td
e'1#H
*?OPP  H!5}E QP (2 fPPPs   A>BBc           	     v   . ROpVP                  \        P                  4       R Uu. uF#  pRV 2\        \	        V4      ^,          4      3NK%  	  ppV FG  w  rEV P                  V RV 24      ;_uu_ 4        V P                  \        V4      V4       RRR4       KI  	  R# u upi   + '       g   i     Kc  ; i)z@Ensure that supported control sequences are parsed successfully.z\C-r   N)@[]r!   ^_z\<space>z	\<delete> )extendr   r   chrordr   r   r   )r   keysr   r   r   r   s   &     r   test_control_sequences$TestParseKeys.test_control_sequences!   s    IF(()FHIbscU|SSD%9:b
I'1#H
*?OPP  H!5}E QP (2 JPPPs   )B"8B''B8c                    V P                  \        R 4      RR.4       V P                  \        R4      RR.4       V P                  \        R4      RR.4       R# )z\M-aaz\M-bbz\M-ccNr   r   r   s   &r   test_meta_sequences!TestParseKeys.test_meta_sequences*   sM    G,vsm<G,vsm<G,vsm<    c                z    V P                  \        R 4      . RO4       V P                  \        R4      . RO4       R# )z\C-a\n\<up>z\M-a\t\<down>N)
up)r4   r5   	downr8   r9   s   &r   test_combinationsTestParseKeys.test_combinations/   s0    $457KL$679TUr<   c           
     l   . ROpV F  w  r#V P                  V RV 24      ;_uu_ 4        V P                  \        4      ;_uu_ 4       p\        V4       RRR4       V P	                  V\        XP                  4      4       RRR4       K  	  R#   + '       g   i     LC; i  + '       g   i     K  ; i)\Caz should give error N)
)rF   \C must be followed by `-')z\carG   )z\C-\C-zdoubled \C-)z\Ma\M must be followed by `-')z\marH   )z\M-\M-zdoubled \M-)z\<leftzunterminated \<)z\<unsupported>zunrecognised keyname)u   \大zunknown backslash escape)z\C-\<backspace>z\C- followed by invalid key)r   assertRaisesr   r   assertInstr	exception)r   cases	test_keysexpected_erres   &    r   test_keyspec_errors!TestParseKeys.test_keyspec_errors3   s    
 (-#I+>|nMNN&&|44y) 5lC,<= ON (-44 ONNs#   B"B-B"BB""B3c                    . ROpV F4  pV P                  \        4      ;_uu_ 4        \        V4       RRR4       K6  	  R#   + '       g   i     KK  ; i)r!   N)r!   z\Cz\C-\C)rI   
IndexErrorr   )r   r   rN   s   &  r   test_index_errorsTestParseKeys.test_index_errorsF   s<    -
#I"":..9% /. $...s   AAr,   N)__name__
__module____qualname____firstlineno__r   r   r$   r1   r:   rC   rQ   rU   __static_attributes____classdictcell____classdict__s   @r   r	   r	      s7     F	FFF=
V>&& &r<   r	   c                   V   a  ] tR t^Mt o R tR tR tR tR tR t	R t
R tR	 tR
tV tR# )TestCompileKeymapc                D    / p\        V4      pV P                  V/ 4       R # )Nr   r   r   keymapresults   &  r   test_empty_keymap#TestCompileKeymap.test_empty_keymapN   s!    '$r<   c                L    R R/p\        V4      pV P                  VR R/4       R# )   aactionNrb   rc   s   &  r   test_single_keymap$TestCompileKeymap.test_single_keymapS   s+    !'$!12r<   c                T    R RR//p\        V4      pV P                  VR RR//4       R# )ri      brj   Nrb   rc   s   &  r   test_nested_keymap$TestCompileKeymap.test_nested_keymapX   s5    x()'$x(8!9:r<   c                T    R RR//p\        V4      pV P                  VR RR//4       R# )ri   r<   rj   Nrb   rc   s   &  r   test_empty_value"TestCompileKeymap.test_empty_value]   s3    h('$h!89r<   c                \    R RRRR//p\        V4      pV P                  VR RRRR//4       R# )ri   r<   action1rn   action2Nrb   rc   s   &  r   test_multiple_empty_values,TestCompileKeymap.test_multiple_empty_valuesb   s=    iy9:'$iy(I!JKr<   c                \    R RRRR//p\        V4      pV P                  VR RRRR//4       R# )ri   rn   ru      crv   Nrb   rc   s   &  r   test_multiple_keymaps'TestCompileKeymap.test_multiple_keymapsg   s=    y$	:;'$y$	(J!KLr<   c                \    R RRR///p\        V4      pV P                  VR RRR///4       R# )ri   rn   rz   rj   Nrb   rc   s   &  r   test_nested_multiple_keymaps.TestCompileKeymap.test_nested_multiple_keymapsl   s?    h/01'$h/?(@!ABr<   c                    R RRR/pV P                  \        4      ;_uu_ 4        \        V4       RRR4       R#   + '       g   i     R# ; i)ri   r7   dNs   ab)rI   r   r   )r   kms   & r   test_clashing_definitions+TestCompileKeymap.test_clashing_definitionsq   s8    Cc*|,,2 -,,,s	   :A	c                    V P                  \        4      ;_uu_ 4        \        ^{R/4       RRR4       R#   + '       g   i     R# ; i){   r5   N)rI   	TypeErrorr   r9   s   &r   test_non_bytes_key$TestCompileKeymap.test_non_bytes_keyv   s.    y))C:& *)))s	   6A	r,   N)rW   rX   rY   rZ   rf   rk   ro   rr   rw   r{   r~   r   r   r[   r\   r]   s   @r   r`   r`   M   s:     %
3
;
:
L
M
C

' 'r<   r`   )r   unittest_pyrepl.keymapr   r   r   r   r   TestCaser	   r`   r,   r<   r   <module>r      s8      X XC&H%% C&L+')) +'r<   