
    `jW
                     z    d Z ddlmZ ddlmZ dZ G d dej                  Zedk    r ej                     dS dS )	zTests for formatting.py.    )
formatting)	testutilsP   c                   J    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 ZdS )FormattingTestc                 ^    t          j        d          }|                     |ddg           d S )Nhelloz[1mhello[0m)r   BoldassertInselftexts     X/home/jworkman/hermes-web-chat/venv/lib/python3.11/site-packages/fire/formatting_test.py	test_boldzFormattingTest.test_bold   s1    ?7##DMM$"7899999    c                 ^    t          j        d          }|                     |ddg           d S )Nr	   z[4mhello[0m)r   	Underliner   r   s     r   test_underlinezFormattingTest.test_underline   s2    ((DMM$"7899999r   c                 ^    t          j        dd          }|                     d|           d S )Nr	      spacesz  hellor   IndentassertEqualr   s     r   test_indentzFormattingTest.test_indent!   s3    WQ///DY%%%%%r   c                 ^    t          j        dd          }|                     d|           d S )Nzhello
worldr   r   z  hello
  worldr   r   s     r   test_indent_multiple_linesz)FormattingTest.test_indent_multiple_lines%   s4    ^A666D'.....r   c                 ^    t          j        dg          }|                     dg|           d S )Nricer   WrappedJoinr   r   liness     r   test_wrap_one_itemz!FormattingTest.test_wrap_one_item)   s2    "F8,,EfXu%%%%%r   c                 f    t          j        g dd          }|                     g d|           d S )N)r    beanschickencheese   )width)zrice | beans |z	chicken |r)   r!   r#   s     r   test_wrap_multiple_itemsz'FormattingTest.test_wrap_multiple_items-   sY    "#I#I#I)+- - -E      !&( ( ( ( (r   c                 n    d}t          j        |dt                    }|                     d|           d S )NThis is a string
   r   available_spaceline_lengthz
This is...r   EllipsisTruncateLINE_LENGTHr   r   r   truncated_texts      r   test_ellipsis_truncatez%FormattingTest.test_ellipsis_truncate4   sD    D02;@ @ @N\>22222r   c                 n    d}t          j        |dt                    }|                     d|           d S )Nr.   r   r0   r3   r6   s      r   'test_ellipsis_truncate_not_enough_spacez6FormattingTest.test_ellipsis_truncate_not_enough_space:   sB    D01+? ? ?N'88888r   c                 n    d}t          j        |dt                    }|                     d|           d S )N1000000000L   r0   z10...0Lr   EllipsisMiddleTruncater5   r   r6   s      r   test_ellipsis_middle_truncatez,FormattingTest.test_ellipsis_middle_truncate@   sA    D61+? ? ?NY/////r   c                 n    d}t          j        |dt                    }|                     d|           d S )Nr<   r   r0   r>   r6   s      r   .test_ellipsis_middle_truncate_not_enough_spacez=FormattingTest.test_ellipsis_middle_truncate_not_enough_spaceF   sA    D61+? ? ?N]N33333r   N)__name__
__module____qualname__r   r   r   r   r%   r,   r8   r:   r@   rB    r   r   r   r      s        : : :: : :& & &/ / /& & &( ( (3 3 39 9 90 0 04 4 4 4 4r   r   __main__N)	__doc__firer   r   r5   BaseTestCaser   rC   mainrF   r   r   <module>rL      s                 34 34 34 34 34Y+ 34 34 34l z). r   