Ñò
à"Ic        
   @   sÙ   d  Z  d d k Z d d k Z d d k Z d d k Z d d k Z e i d d e ƒ d d k l	 Z	 l
 Z
 l Z d d k Te i d j o e	 d ƒ ‚ n d	 e i f d
 „  ƒ  YZ d „  Z e d j o e ƒ  n d S(   s0   
   Tests for commands module
   Nick Mathewson
iÿÿÿÿNt   ignores$   .*commands.getstatus.. is deprecated(   t   TestSkippedt   run_unittestt   reap_children(   t   *t   posixs!   Not posix; skipping test_commandst   CommandTestsc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s£   |  i  t d ƒ d ƒ |  i  t d ƒ d ƒ d  } zK t i ƒ  } t i i | d ƒ } t d | ƒ \ } } |  i	 | d ƒ Wd  | d  j	 o t i
 | ƒ n Xd  S(   Ns
   echo xyzzyt   xyzzyi    t   foos   cat (   i    R   (   t   assertEqualst	   getoutputt   getstatusoutputt   Nonet   tempfilet   mkdtempt   ost   patht   joint   assertNotEqualst   rmdir(   t   selft   dirt   namet   statust   output(    (    s/   /mit/python/lib/python2.6/test/test_commands.pyt   test_getoutput   s    c         C   s/   d } |  i  t i | t d ƒ t i ƒ ƒ d  S(   Ns)  d.........   # It is a directory.
                  \+?          # It may have ACLs.
                  \s+\d+       # It has some number of links.
                  [^/]*        # Skip user, group, size, and date.
                  /\.          # and end with the name of the file.
               s   /.(   t   assert_t   ret   matcht	   getstatust   VERBOSE(   R   t   pat(    (    s/   /mit/python/lib/python2.6/test/test_commands.pyt   test_getstatus-   s    (   t   __name__t
   __module__R   R    (    (    (    s/   /mit/python/lib/python2.6/test/test_commands.pyR      s   	c           C   s   t  t ƒ t ƒ  d  S(   N(   R   R   R   (    (    (    s/   /mit/python/lib/python2.6/test/test_commands.pyt	   test_main?   s    
t   __main__(   t   __doc__t   unittestR   R   R   t   warningst   filterwarningst   DeprecationWarningt   test.test_supportR   R   R   t   commandsR   t   TestCaseR   R#   R!   (    (    (    s/   /mit/python/lib/python2.6/test/test_commands.pyt   <module>   s   $
&	