Sindbad~EG File Manager
�
&Μg���dZddlmZddlZddlmZddlmZmZGd�d�Z Gd�d ej�Zed
k(rejd��yy)
zTest autoexpand, coverage 100%.�)�
AutoExpandN)�requires)�Text�Tkc��eZdZd�Zy)�DummyEditwinc��||_y�N)�text)�selfrs �>/usr/local/lib/python3.12/idlelib/idle_test/test_autoexpand.py�__init__zDummyEditwin.__init__s ���� �N)�__name__�
__module__�__qualname__r�rr
rr s��rrc�P�eZdZed��Zed��Zd�Zd�Zd�Zd�Z d�Z
d�Zy )
�AutoExpandTestc���td�t�|_t|j�|_tt
|j��|_d�|j_y)N�guic��yr
rrrr
�<lambda>z+AutoExpandTest.setUpClass.<locals>.<lambda>s��tr) rr�tkrrrr�auto_expand�bell��clss r
�
setUpClasszAutoExpandTest.setUpClasssB�������������<���$�\�#�(�(�%;�<���+����rc�^�|`|`t|d�r|jj �|`yy)Nr)rr�hasattrr�destroyrs r
�
tearDownClasszAutoExpandTest.tearDownClass's-���H�c�o��3����F�F�N�N����rc�<�|jjdd�y)N�1.0�end)r�delete)rs r
�tearDownzAutoExpandTest.tearDown.s��� � �����&rc�<�|j}|jj}|j}||�d�|j dd�||�d�|j dd�||�d�|j dd�||�d�|j dd�||�d�|j dd�||�d �|jd
d�||�d�|jdd�||�d�y)
N��insert�t�his�this� �isz
sample
string�stringz3.0r%r&)rr�getprevword�assertEqualr+r')rr�previous�equals r
�test_get_prevwordz AutoExpandTest.test_get_prevword1s����y�y���#�#�/�/��� � ��
�h�j�"�����H�c�"�
�h�j�#�����H�e�$�
�h�j�&�!����H�c�"�
�h�j�"�����H�d�#�
�h�j�$�����H�0�1�
�h�j�(�#����E�8�$�
�h�j�"�����E�5�!�
�h�j�"�rc��|jj}|jj}|j}|jjdd�||jj
�gd��|d�||�d�|d�||�d�|d�||�d�|d�||�d�y) Nr+zab ac bx ad ab a)�ab�ad�ac�a�eventr8r9r:r;)rr2�expand_word_eventr3rr+�getwords)rr4�expandr5s r
�test_before_onlyzAutoExpandTest.test_before_onlyMs����#�#�/�/���!�!�3�3��� � ��� � ����#5�6�
�d���'�'�)�+B�C��w��
�h�j�$���w��
�h�j�$���w��
�h�j�$���w��
�h�j�#�rc���|j}|jj}|jj}|j}|jdd�|j
dd�||jj�gd��|d�||�d�|d�||�d�|d�||�d�|d�||�d �y)
Nr+z a, [ab] ac: () bx"" cd ac= ad yaz1.1)r8r:r9r;r<r8r:r9r;�rrr2r=r3r+�mark_setr>�rrr4r?r5s r
�test_after_onlyzAutoExpandTest.test_after_only]s����y�y���#�#�/�/���!�!�3�3��� � �����H�@�A��
�
�h��&�
�d���'�'�)�+B�C��w��
�h�j�$���w��
�h�j�$���w��
�h�j�$���w��
�h�j�#�rc���|j}|jj}|jj}|j}|jdd�|jdd�|j
dd�||jj�gd��|d�||�d�|d�||�d�|d�||�d �y)
Nr+z ab xy yz
z
a ac by acz2.1)r8r:r;r<r8r:r;rBrDs r
�test_both_before_afterz%AutoExpandTest.test_both_before_afterps����y�y���#�#�/�/���!�!�3�3��� � �����H�l�+����H�l�+��
�
�h��&�
�d���'�'�)�+<�=��w��
�h�j�$���w��
�h�j�$���w��
�h�j�#�rc�.�|j}|jj}|j}||jj �g�||d�d�|jdd�||jj �g�|jdd�|j
dd�|d�|jj}|j
dd�|d�|jj}|j||�y)Nr<�breakr+z
bx cy dz azac xy a ac ad az1.7z1.end) rrr=r3r>r+rC�state�assertNotEqual)rrr?r5�
initial_state� new_states r
�test_other_expand_casesz&AutoExpandTest.test_other_expand_cases�s����y�y���!�!�3�3��� � �� �d���'�'�)�2�.�
�f�W�o�w�'����H�l�+�
�d���'�'�)�2�.�
���H�/�0��
�
�h��&��w���(�(�.�.�
��
�
�h��(��w���$�$�*�*� ����M�9�5rN)rrr�classmethodrr#r(r6r@rErGrNrrr
rrsF���,��,�,����'��8� �&�$6rr�__main__�)� verbosity)�__doc__�idlelib.autoexpandr�unittest�test.supportr�tkinterrrr�TestCaserr�mainrrr
�<module>rZsP��!�)��!����
I6�X�&�&�I6�X�z���H�M�M�A��r
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists