ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ V~gc@sydZddlZddlZddlmZmZmZddlZddlm Z ddl m Z m Z ddl mZdZdZd dd YZd ejfd YZd ejfdYZdejfdYZdejfdYZdejfdYZdejfdYZdejfdYZedkruejddddndS(s9Test functions and SearchEngine class in SearchEngine.py.iN(t BooleanVart StringVartTclError(t SearchEngine(tVartMbox(tTextcCstt_tt_tt_dS(N(RtseRRRt tkMessageBox(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt setUpModules  cCstt_tt_tt_dS(N(RRRR(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttearDownModules  tMockcBseZdZRS(cOsdS(N((tselftargstkwargs((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt__init__t(t__name__t __module__R(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR stGetTestcBseZdZRS(cCs~tj}tt_z[t}tj|}|j|tj|j|j||jtj||Wd|t_XdS(N(RRR tgettassertIsInstancetassertIst _searchengine(R t saved_Enginetroottengine((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttest_get#s   (RRR(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR!stGetLineColTestcBseZdZRS(cCsb|jtjdd|jtjdd |jttjd|jttjddS( Ns1.0iis1.11i s 1.0 lineendtend(ii(ii (t assertEqualRt get_line_colt assertRaisest ValueError(R ((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttest_get_line_col1s(RRR"(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR/stGetSelectionTestcBseZdZRS(cCsst}|jddd}||_|jtj|dd}||_|jtj|ddS( Ns1.0s Hello World!cSs*|dkrdS|dkr dStdS(Ns sel.firsts1.0ssel.lasts1.12(R(ts((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pytselKs   s1.12cSs|dkrdStdS(Ntinserts1.5(R(R$((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pytmarkSs s1.5(s1.0s1.12(s1.5s1.5(tmockTextR&tindexRRt get_selection(R ttextR%R'((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttest_get_selectionEs     (RRR,(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR#8s tReverseSearchTestcBseZdZRS(cCs|j}d}tjd}|tj||t|jd |tj||djd |tj||djd |tj||djd |tj||dddS( NsHere is an 'is' test text.tisi ii iii(i i(i i(ii(ii(RtretcompileRtsearch_reversetlentspantNone(R tEqualtlinetprog((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttest_search_reverse]s ("""(RRR8(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR-[stSearchEngineTestcBs>eZdZdZdZdZdZdZRS(cCstjdd|_dS(NR(RRR4R(R ((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pytsetUpkscCsW|j}|j}||jd|jd||jd||jt|jjd||jt||j t|j jd||j t||j t|j jd||j t||j t|jjd||j t||jt|jjd||jtdS(NRthelloii(RRtgetpattsetpattisretFalsetrevartsettTruetiscasetcasevartiswordtwordvartiswraptwrapvartisbacktbackvar(R RR5((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt test_is_getps(   cCsc|j}|jd|j|jd|jjd|jd|j|jddS(Ns\sis\\s(Rt setcookedpatRR<R@RA(R R((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttest_setcookedpats    cCs|j}|j}||jd|jd||jd|jjt||jd|jjt|jd||jd|jjt||jddS(NRR;s \bhello\bs\ss\\s( RRt getcookedpatR=RFRARBR?R@(R RR5((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttest_getcookedpats    cCs|j}|j}|jd|j}||jtjdtjj|jj d|j}||jtjdjd|jd||jd|jd|j j d||jd|jt j jddS(NtHelloiiRt+s#Error: nothing to repeat Pattern: +(RRR=tgetprogtpatternR/R0t IGNORECASERDRAR4R@Rt showerrortmessage(R RR5ttemppat((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt test_getprogs    "   cCstj}|j}d}d}||jj||d||jdd|d}||j|||jj||dd||jd|d7}||j|dS(Ns[a-zs$unexpected end of regular expressionsRegular expression errorsError: s Pattern: [a-zis Offset: 5(RRURRt report_errorR4ttitleRV(R RUR5tpattmsgtexpected_message((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttest_report_errors   (RRR:RKRMRORXR^(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR9hs      t SearchTestcBs eZedZdZRS(cCskt|_d}|jjd|tjd|_tjd|_ d|j _ d|j _ dS(Ns&First line Line with target Last line s1.0ttargetcWs d|fS(Ntf((R ((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pytRcWs d|fS(Ntb((R ((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRbR( R(R+R&R/R0R[RRR4Rtsearch_forwardtsearch_backward(tclst test_text((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt setUpClasss c Cs|j}|j}|j}|j}|j}|jjd|||dd}||_||||d||ddt t ff|j jt ||||d||ddt t ff|j jt |j jt ||||d||ddt t ff|j jt d}||_||||d||ddt t ff||||t d||dd t t ff|j jt ||||d||dd t t ff||||t d||ddt t ffdS( NcSs|dkrdStdS(NR&s1.5(R(R$((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR's RaiiRccSs*|dkrdS|dkr dStdS(Ns sel.firsts2.10ssel.lasts2.16(R(R$((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR%s   iii ( RRt search_textR+R[tpatvarRAR4R)RBR?RHRJ(R R5RtsearchR+R[R'R%((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt test_searchs.       ...  .1.(RRt classmethodRhRl(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyR_stForwardBackwardTestcBs2eZedZdZdZdZRS(cCstjd|_t|_d|j_d}|jjd|tj d|_ dd f|_ tj d|_ tj d |_ dS( NcSsdS(Ns4.0((R)((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRbRs&First line Line with target Last line s1.0R`ii itxyzs\w*(i i(RRR4RR(R+R)R&R/R0R[trestfailpattemptypat(RfRg((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRh s csdfd}|S(Nics@j|||||}|r<|d|djfS|S(Nii(R+R3(R[R6tcoltwraptokRp(tfuncR (sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRk s((R RvRk((RvR sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyt make_searchscCs|j}|j|jj}|j}|||ddt|j|||ddt|j|||ddtd|||ddt|j|||j ddtd|||j ddtdtddf|||j ddt|jdS( Niiiii i Ru(i i ( RRwRRdR[RBRpR?R4RqRr(R R5tforwardR[((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttest_search_forward&s  +cCs|j}|j|jj}|j}|||ddt|j|||ddt|j|||ddtd|||ddt|j|||j ddtd|||j ddtdtdd f|||j ddtdd fdS( Niiiiii i Ru(i i (ii ( RRwRReR[RBRpR?R4RqRr(R R5tbackwardR[((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyttest_search_backward7s  +(RRRmRhRwRyR{(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyRns  t__main__t verbosityitexit((t__doc__R/tunittesttTkinterRRRRtidlelibRRtidlelib.idle_test.mock_tkRRRR(R R R tTestCaseRRR#R-R9R_RnRtmain(((sH/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_searchengine.pyts&      # `=C