mς
­fIc           @   s’   d  Z  d k Z d k Z d k Z d k Z d k l Z l Z 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
N(   s   TestSkippeds   run_unittest(   t   *t   posixs!   Not posix; skipping test_commandst   CommandTestsc           B   s   t  Z d   Z d   Z RS(   Nc         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   selft   assertEqualst	   getoutputt   getstatusoutputt   Nonet   dirt   tempfilet   mkdtempt   ost   patht   joint   namet   statust   outputt   assertNotEqualst   rmdir(   R   R   R   R   R
   (    (    t/   /mit/python/lib/python2.4/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   patR   t   assert_t   ret   matcht	   getstatust   VERBOSE(   R   R   (    (    R   t   test_getstatus)   s    (   t   __name__t
   __module__R   R   (    (    (    R   R      s   	c           C   s   t  t  d  S(   N(   t   run_unittestR   (    (    (    R   t	   test_main;   s    t   __main__(   t   __doc__t   unittestR   R   R   t   test.test_supportt   TestSkippedR    t   commandsR   t   TestCaseR   R!   R   (   R&   R   R$   R   R!   R    R   R   (    (    R   t   ?   s   	&	