o
    ĎiW
                     @   sJ   d Z ddlmZ ddlmZ dZG dd dejZedkr#e  dS dS )	zTests for formatting.py.    )
formatting)	testutilsP   c                   @   s\   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd ZdS )FormattingTestc                 C      t d}| |ddg d S )Nhelloz[1mhello[0m)r   BoldassertInselftext r   P/home/jeff/fluffinator/venv/lib/python3.10/site-packages/fire/formatting_test.py	test_bold      
zFormattingTest.test_boldc                 C   r   )Nr   z[4mhello[0m)r   	Underliner	   r
   r   r   r   test_underline   r   zFormattingTest.test_underlinec                 C      t jddd}| d| d S )Nr      spacesz  hellor   IndentassertEqualr
   r   r   r   test_indent!      zFormattingTest.test_indentc                 C   r   )Nzhello
worldr   r   z  hello
  worldr   r
   r   r   r   test_indent_multiple_lines%   r   z)FormattingTest.test_indent_multiple_linesc                 C   s   t dg}| dg| d S )Nricer   WrappedJoinr   r   linesr   r   r   test_wrap_one_item)   s   z!FormattingTest.test_wrap_one_itemc                 C   s&   t jg ddd}| g d| d S )N)r   beanschickencheese   )width)zrice | beans |z	chicken |r%   r   r    r   r   r   test_wrap_multiple_items-   s   

z'FormattingTest.test_wrap_multiple_itemsc                 C   $   d}t j|dtd}| d| d S )NThis is a string
   r   available_spaceline_lengthz
This is...r   EllipsisTruncateLINE_LENGTHr   r   r   truncated_textr   r   r   test_ellipsis_truncate4   
   z%FormattingTest.test_ellipsis_truncatec                 C   $   d}t j|dtd}| d| d S )Nr*   r   r,   r/   r2   r   r   r   'test_ellipsis_truncate_not_enough_space:   r5   z6FormattingTest.test_ellipsis_truncate_not_enough_spacec                 C   r)   )N1000000000L   r,   z10...0Lr   EllipsisMiddleTruncater1   r   r2   r   r   r   test_ellipsis_middle_truncate@   r5   z,FormattingTest.test_ellipsis_middle_truncatec                 C   r6   )Nr8   r   r,   r:   r2   r   r   r   .test_ellipsis_middle_truncate_not_enough_spaceF   r5   z=FormattingTest.test_ellipsis_middle_truncate_not_enough_spaceN)__name__
__module____qualname__r   r   r   r   r"   r(   r4   r7   r<   r=   r   r   r   r   r      s    r   __main__N)	__doc__firer   r   r1   BaseTestCaser   r>   mainr   r   r   r   <module>   s   6