mς
­fIc           @   s   d  Z  d k Z d k Z d k l Z d k l Z e i Z d e j o d e d Z n d   Z d   Z	 d   Z
 e
   d S(	   sQ   Basic tests for os.popen()

  Particularly useful for platforms that fake popen.
N(   s   TestSkipped(   s   popent    t   "c         C   s^   d t  |  f } t |  i   } t |  d } | | j o d GHd |  | | f GHn d  S(   Ns$   %s -c "import sys;print sys.argv" %si   s$   Error in popen commandline handling.s+    executed '%s', expected '%r', but got '%r'(	   t   pythont   cmdlinet   cmdt   popent   readt   datat   evalt   gott   expected(   R   R
   R   R	   R   (    (    t,   /mit/python/lib/python2.4/test/test_popen.pyt   _do_test_commandline   s    c           C   sH   t  d d d g  t  d d d d g  t  d d d d g  d	 GHd  S(
   Ns   foo bart   foot   bars    foo "spam and eggs" "silly walk"s   spam and eggss
   silly walks   foo "a \"quoted\" arg" bars   a "quoted" args2   popen seemed to process the command-line correctly(   R   (    (    (    R   t   _test_commandline   s    c           C   s   d GHt    d  S(   Ns   Test popen:(   R   (    (    (    R   t   main#   s    (   t   __doc__t   ost   syst   test.test_supportt   TestSkippedR   t
   executableR   R   R   R   (   R   R   R   R   R   R   R   R   (    (    R   t   ?   s   							