o
    $c
                     @   sn   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dZG dd	 d	ej	Z
ed
kr5e  dS dS )zTests for formatting.py.    )absolute_import)division)print_function)
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   ZBoldassertInselftext r   DD:\Projects\ConvertPro\env\Lib\site-packages\fire\formatting_test.py	test_bold      
zFormattingTest.test_boldc                 C   r	   )Nr
   z[4mhello[0m)r   Z	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   Z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   Z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   ZbeansZchickencheese   )width)zrice | beans |z	chicken |r"   r   r   r   r   r   test_wrap_multiple_items1   s   

z'FormattingTest.test_wrap_multiple_itemsc                 C   $   d}t j|dtd}| d| d S )NThis is a string
   r   Zavailable_spaceZline_lengthz
This is...r   ZEllipsisTruncateLINE_LENGTHr   r   r   Ztruncated_textr   r   r   test_ellipsis_truncate8   
   z%FormattingTest.test_ellipsis_truncatec                 C   $   d}t j|dtd}| d| d S )Nr'   r   r)   r*   r,   r   r   r   'test_ellipsis_truncate_not_enough_space>   r.   z6FormattingTest.test_ellipsis_truncate_not_enough_spacec                 C   r&   )N1000000000L   r)   z10...0Lr   ZEllipsisMiddleTruncater+   r   r,   r   r   r   test_ellipsis_middle_truncateD   r.   z,FormattingTest.test_ellipsis_middle_truncatec                 C   r/   )Nr1   r   r)   r3   r,   r   r   r   .test_ellipsis_middle_truncate_not_enough_spaceJ   r.   z=FormattingTest.test_ellipsis_middle_truncate_not_enough_spaceN)__name__
__module____qualname__r   r   r   r   r!   r%   r-   r0   r4   r5   r   r   r   r   r      s    r   __main__N)__doc__Z
__future__r   r   r   firer   r   r+   ZBaseTestCaser   r6   mainr   r   r   r   <module>   s   6