ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
{fc           @   sy  d  Z  d d l Z d d l Z d d l m Z m Z m Z d d l Z d d l m	 Z
 d d l m Z m Z d d l m Z d   Z d   Z d	 d d
     YZ d e j f d     YZ d e j f d     YZ d e j f d     YZ d e j f d     YZ d e j f d     YZ d e j f d     YZ d e j f d     YZ e d k rue j d d d d  n  d S(   s9   Test functions and SearchEngine class in SearchEngine.py.iN(   t
   BooleanVart	   StringVart   TclError(   t   SearchEngine(   t   Vart   Mbox(   t   Textc           C   s   t  t _ t  t _ t t _ d  S(   N(   R   t   seR    R   R   t   tkMessageBox(    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   setUpModule   s    		c           C   s   t  t _  t t _ t t _ d  S(   N(   R    R   R   R   (    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   tearDownModule   s    		t   Mockc           B   s   e  Z d    Z RS(   c         O   s   d  S(   N(    (   t   selft   argst   kwargs(    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   __init__   t    (   t   __name__t
   __module__R   (    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR      s   t   GetTestc           B   s   e  Z d    Z RS(   c         C   s~   t  j } t t  _ z[ t   } t  j |  } |  j | t  j  |  j | j |  |  j t  j |  |  Wd  | t  _ Xd  S(   N(   R   R   R   t   gett   assertIsInstancet   assertIst   _searchengine(   R   t   saved_Enginet   roott   engine(    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_get#   s    			(   R   R   R   (    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR   !   s   t   GetLineColTestc           B   s   e  Z d    Z RS(   c         C   sb   |  j  t j d  d  |  j  t j d  d	  |  j t t j d  |  j t t j d  d  S(
   Ns   1.0i   i    s   1.11i   s   1.0 lineendt   end(   i   i    (   i   i   (   t   assertEqualR   t   get_line_colt   assertRaisest
   ValueError(   R   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_get_line_col1   s    (   R   R   R"   (    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR   /   s   t   GetSelectionTestc           B   s   e  Z d    Z RS(   c         C   ss   t    } | j d d  d   } | | _ |  j t j |  d  d   } | | _ |  j t j |  d  d  S(	   Ns   1.0s   Hello World!c         S   s*   |  d k r d S|  d k r  d St   d  S(   Ns	   sel.firsts   1.0s   sel.lasts   1.12(   R   (   t   s(    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   selK   s
      s   1.12c         S   s   |  d k r d St   d  S(   Nt   inserts   1.5(   R   (   R$   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   markS   s     s   1.5(   s   1.0s   1.12(   s   1.5s   1.5(   t   mockTextR&   t   indexR   R   t   get_selection(   R   t   textR%   R'   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_get_selectionE   s    					(   R   R   R,   (    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR#   8   s   t   ReverseSearchTestc           B   s   e  Z d    Z RS(   c         C   s   |  j  } d } t j d  } | t j | | t |   j   d	  | t j | | d  j   d
  | t j | | d  j   d  | t j | | d  j   d  | t j | | d  d   d  S(   Ns   Here is an 'is' test text.t   isi   i   i   i   i   i   (   i   i   (   i   i   (   i   i   (   i   i   (   R   t   ret   compileR   t   search_reverset   lent   spant   None(   R   t   Equalt   linet   prog(    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_search_reverse]   s    	("""(   R   R   R8   (    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR-   [   s   t   SearchEngineTestc           B   s>   e  Z d    Z d   Z d   Z d   Z d   Z d   Z RS(   c         C   s   t  j d d   |  _ d  S(   NR   (   R   R   R4   R   (   R   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   setUpk   s    c         C   sW  |  j  } |  j } | | j   d  | j d  | | j   d  | | j   t  | j j d  | | j   t  | | j	   t  | j
 j d  | | j	   t  | | j   t  | j j d  | | j   t  | | j   t  | j j d  | | j   t  | | j   t  | j j d  | | j   t  d  S(   NR   t   helloi   i    (   R   R   t   getpatt   setpatt   isret   Falset   revart   sett   Truet   iscaset   casevart   iswordt   wordvart   iswrapt   wrapvart   isbackt   backvar(   R   R   R5   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_is_getp   s(    		c         C   sc   |  j  } | j d  |  j | j   d  | j j d  | j d  |  j | j   d  d  S(   Ns   \si   s   \\s(   R   t   setcookedpatR   R<   R@   RA   (   R   R   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_setcookedpat   s    	c         C   s   |  j  } |  j } | | j   d  | j d  | | j   d  | j j t  | | j   d  | j j t  | j d  | | j   d  | j j t  | | j   d  d  S(   NR   R;   s	   \bhello\bs   \ss   \\s(	   R   R   t   getcookedpatR=   RF   RA   RB   R?   R@   (   R   R   R5   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_getcookedpat   s    		c         C   s   |  j  } |  j } | j d  | j   } | | j t j d t j  j  | j j	 d  | j   } | | j t j d  j d  | j d  | | j   d   | j d  | j j	 d  | | j   d   |  j t j j d  d  S(   Nt   Helloi   i    R   t   +s#   Error: nothing to repeat
Pattern: +(   R   R   R=   t   getprogt   patternR/   R0   t
   IGNORECASERD   RA   R4   R@   R   t	   showerrort   message(   R   R   R5   t   temppat(    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_getprog   s    		"c         C   s   t  j } |  j } d } d } | |  j j | |  d   | | j d  d | d } | | j |  | |  j j | | d  d   | | j d  | d 7} | | j |  d  S(   Ns   [a-zs$   unexpected end of regular expressions   Regular expression errors   Error: s   
Pattern: [a-zi   s
   
Offset: 5(   R   RU   R   R   t   report_errorR4   t   titleRV   (   R   RU   R5   t   patt   msgt   expected_message(    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_report_error   s    		
(   R   R   R:   RK   RM   RO   RX   R^   (    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR9   h   s   					t
   SearchTestc           B   s    e  Z e d     Z d   Z RS(   c         C   sk   t    |  _ d } |  j j d |  t j d  |  _ t j d   |  _	 d   |  j	 _
 d   |  j	 _ d  S(   Ns&   First line
Line with target
Last line
s   1.0t   targetc          W   s
   d |  f S(   Nt   f(    (   R   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   <lambda>   R   c          W   s
   d |  f S(   Nt   b(    (   R   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRb      R   (   R(   R+   R&   R/   R0   R[   R   R   R4   R   t   search_forwardt   search_backward(   t   clst	   test_text(    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt
   setUpClass   s    c      	   C   s  |  j  } |  j } | j } |  j } |  j } | j j d   | | |  d   d   } | | _ | | | |  d | | d d t	 t
 f f  | j j t
  | | | |  d | | d d t
 t
 f f  | j j t	  | j j t	  | | | |  d | | d d t	 t
 f f  | j j t
  d   } | | _ | | | |  d | | d d t	 t
 f f  | | | | t	  d | | d d	 t	 t	 f f  | j j t	  | | | |  d | | d d	 t	 t
 f f  | | | | t	  d | | d d t	 t	 f f  d  S(
   Nc         S   s   |  d k r d St   d  S(   NR&   s   1.5(   R   (   R$   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR'      s     Ra   i   i   Rc   c         S   s*   |  d k r d S|  d k r  d St   d  S(   Ns	   sel.firsts   2.10s   sel.lasts   2.16(   R   (   R$   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR%      s
      i   i   i
   (   R   R   t   search_textR+   R[   t   patvarRA   R4   R)   RB   R?   RH   RJ   (   R   R5   R   t   searchR+   R[   R'   R%   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_search   s.    							...		.1.(   R   R   t   classmethodRh   Rl   (    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR_      s   t   ForwardBackwardTestc           B   s2   e  Z e d     Z d   Z d   Z d   Z RS(   c         C   s   t  j d   |  _ t   |  _ d   |  j _ d } |  j j d |  t j	 d  |  _
 d d
 f |  _ t j	 d  |  _ t j	 d	  |  _ d  S(   Nc         S   s   d S(   Ns   4.0(    (   R)   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRb     R   s&   First line
Line with target
Last line
s   1.0R`   i   i
   i   t   xyzs   \w*(   i
   i   (   R   R   R4   R   R(   R+   R)   R&   R/   R0   R[   t   rest   failpatt   emptypat(   Rf   Rg   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRh     s    c            s   d    f d  } | S(   Ni    c            s@      j  |  | | | |  } | r< | d | d j   f S| S(   Ni    i   (   R+   R3   (   R[   R6   t   colt   wrapt   okRp   (   t   funcR   (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRk      s    (    (   R   Rv   Rk   (    (   Rv   R   s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   make_search  s    c         C   s  |  j  } |  j |  j j  } |  j } | | | d d t  |  j  | | | d d t  |  j  | | | d d t  d   | | | d d t  |  j  | | |  j	 d d t  d   | | |  j
 d d t d t d d f  | | |  j
 d d t  |  j  d  S(	   Ni   i    i   i   i
   i	   Ru   (   i	   i	   (   R   Rw   R   Rd   R[   RB   Rp   R?   R4   Rq   Rr   (   R   R5   t   forwardR[   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_search_forward&  s    		+c         C   s  |  j  } |  j |  j j  } |  j } | | | d d t  |  j  | | | d d t  |  j  | | | d d t  d   | | | d d t  |  j  | | |  j	 d d t  d   | | |  j
 d d t d t d d	 f  | | |  j
 d d t  d d
 f  d  S(   Ni   i   i   i    i   i	   i
   Ru   (   i	   i	   (   i   i	   (   R   Rw   R   Re   R[   RB   Rp   R?   R4   Rq   Rr   (   R   R5   t   backwardR[   (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   test_search_backward7  s    		+(   R   R   Rm   Rh   Rw   Ry   R{   (    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRn     s   		t   __main__t	   verbosityi   t   exit(    (   t   __doc__R/   t   unittestt   TkinterR    R   R   R   t   idlelibR   R   t   idlelib.idle_test.mock_tkR   R   R   R(   R	   R
   R   t   TestCaseR   R   R#   R-   R9   R_   Rn   R   t   main(    (    (    s;   /usr/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt   <module>   s&   			#`=C