U
    k&p[A                     @   s&   d dl Z d dlZG dd de jZdS )    Nc                   @   sT   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S )TextFormatTestsc                 C   s   t jdd| _d S )N
   )width)cliappZ
TextFormatfmtself r	   2/usr/lib/python3/dist-packages/cliapp/fmt_tests.pysetUp   s    zTextFormatTests.setUpc                 C   s   |  | jdd d S )N ZassertEqualr   formatr   r	   r	   r
   *test_returns_empty_string_for_empty_string   s    z:TextFormatTests.test_returns_empty_string_for_empty_stringc                 C   s   |  | jdd d S )Nzfoo barfoo bar
r   r   r	   r	   r
   +test_returns_short_one_line_paragraph_as_is   s    z;TextFormatTests.test_returns_short_one_line_paragraph_as_isc                 C   s   |  | jdd d S )Nz
foo    barr   r   r   r	   r	   r
   &test_collapse_multiple_spaces_into_one"   s    z6TextFormatTests.test_collapse_multiple_spaces_into_onec                 C   s   |  | jdd d S )Nzfoobar wordzfoobar
word
r   r   r	   r	   r
   test_wraps_long_line%   s    z$TextFormatTests.test_wraps_long_linec                 C   s   |  | jdd d S )Nzfoo
bar

yo
yo
foo bar

yo yo
r   r   r	   r	   r
   test_handles_paragraphs(   s    
z'TextFormatTests.test_handles_paragraphsc                 C   s   |  | jdd d S )Nzfoo
bar









yo
yo
r   r   r   r	   r	   r
   (test_collapses_more_than_two_empty_lines-   s    
z8TextFormatTests.test_collapses_more_than_two_empty_linesc                 C   s   |  | jdd d S )Nzfoo
bar

* yo
* a
  and b

wordfoo bar

* yo
* a and b

word
r   r   r	   r	   r
   test_handles_bulleted_lists2   s    
z+TextFormatTests.test_handles_bulleted_listsc                 C   s   |  | jdd d S )Nzfoo
bar
* yo
* a
  and b
wordr   r   r   r	   r	   r
   ;test_handles_bulleted_lists_without_surrounding_empty_lines7   s    
zKTextFormatTests.test_handles_bulleted_lists_without_surrounding_empty_linesN)__name__
__module____qualname__r   r   r   r   r   r   r   r   r   r	   r	   r	   r
   r      s   r   )Zunittestr   ZTestCaser   r	   r	   r	   r
   <module>   s   