B
    v9aE  ã               @   sJ   d dl mZ d dlZd dlmZ G dd„ dejƒZedkrFejdd dS )	é    )ÚrstripN)ÚEditorc               @   s   e Zd Zdd„ Zdd„ ZdS )Ú
rstripTestc             C   s‚   t ƒ }|j}t |¡j}|ƒ  |  | dd¡d¡ | dd¡ |ƒ  |  | dd¡d¡ | dd¡ |ƒ  |  | dd¡d¡ d S )Nz1.0ÚinsertÚ z     z     
Ú
)r   Útextr   ÚRstripÚ	do_rstripÚassertEqualÚgetr   )ÚselfÚeditorr   r
   © r   ú!/usr/lib/python3.7/test_rstrip.pyÚtest_rstrip_line	   s    zrstripTest.test_rstrip_linec             C   sJ   t ƒ }|j}t |¡j}d}d}| d|¡ |ƒ  |  | dd¡|¡ d S )Nz‡Line with an ending tab    
Line ending in 5 spaces     
Linewithnospaces
    indented line
    indented line with trailing space 
    zyLine with an ending tab
Line ending in 5 spaces
Linewithnospaces
    indented line
    indented line with trailing space
z1.0r   )r   r   r   r	   r
   r   r   r   )r   r   r   r
   ZoriginalÚstrippedr   r   r   Útest_rstrip_multiple   s    zrstripTest.test_rstrip_multipleN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r      s   r   Ú__main__é   )Ú	verbosity)	Zidlelibr   ZunittestZidlelib.idle_test.mock_idler   ZTestCaser   r   Úmainr   r   r   r   Ú<module>   s
   -