From: naoki i. <am...@us...> - 2008-05-01 15:21:40
|
Update of /cvsroot/popfile/engine/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8666/tests Modified Files: TestHTML.script TestHTML.tst TestHTTP.tst TestPOP3.tst TestXMLRPC.tst Added Files: TestRandom.tst Log Message: Change Log 1. New HTML module option 'cookie_cipher' UI/HTML.pm UI/HTTP.pm Users can choose Crypt::DES instead of Crypt::Blowfish. 2. Update POPFile::Random module POPFile/Random.pm POPFile/Module.pm Classifier/Bayes.pm UI/HTML.pm UI/HTTP.pm 3. New test script for POPFile::Random tests/TestRandom.tst 4. Fixed a bug that users couldn't login to the UI on some environment UI/HTTP.pm 5. Add some tests for UI::HTML 6. Update TestHTML.tst to pass tests/TestHTML.script Config bar History tab View log file View text message Session timeout Change language in the multiuser mode 7. Minor fix of the test scripts tests/TestXMLRPC.tst tests/TestPOP3.tst tests/TestHTTP.tst Current state of the test suite: TestBayesScript PASS TestBayes PASS TestConfiguration PASS TestHistory PASS TestHTML PASS TestHTTP PASS TestIMAP PASS TestInsertScript PASS * TestLogger PASS TestMailParse PASS TestModule PASS TestMQ PASS TestMutex PASS TestPipeScript PASS TestPOP3 PASS TestProxy PASS TestWordMangle PASS TestXMLRPC PASS * : TODO : needs to add tests for multi user support --- NEW FILE: TestRandom.tst --- # ---------------------------------------------------------------------------- # # Tests for Random.pm # # Copyright (c) 2003-2008 John Graham-Cumming # # This file is part of POPFile # # POPFile is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # POPFile is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with POPFile; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Modified by Sam Schinke (ssc...@us...) # # ---------------------------------------------------------------------------- use POPFile::Random; use POSIX ":sys_wait_h"; my @random_modules = ( POPFile::Random->new( 'Crypt::Random' ), POPFile::Random->new( 'Crypt::OpenSSL::Random' ), POPFile::Random->new( 'Crypt::CBC' ), ); foreach my $random_module ( @random_modules ) { my $has_module = 0; $has_module = eval "require $random_module->{module__}; 1;"; if ( $has_module ) { my $rand_string = $random_module->generate_random_string( 128 ); test_assert( defined( $rand_string ) ); test_assert_equal( length( $rand_string ), 128 ); if ( $random_module->{module__} eq 'Crypt::Random' ) { $rand_string = $random_module->generate_random_string( 128, 1, '' ); test_assert( defined( $rand_string ) ); test_assert_equal( length( $rand_string ), 128 ); }; if ( $random_module->{module__} eq 'Crypt::OpenSSL::Random' ) { $random_module->rand_seed( time ); my $rand_string = $random_module->generate_random_string( 128 ); test_assert( defined( $rand_string ) ); test_assert_equal( length( $rand_string ), 128 ); } } else { print "Warning: skipping $$random_module->{module__} test since the module is not installed\n"; } } Index: TestXMLRPC.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestXMLRPC.tst,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestXMLRPC.tst 16 Apr 2008 13:08:05 -0000 1.12 --- TestXMLRPC.tst 1 May 2008 15:21:44 -0000 1.13 *************** *** 34,37 **** --- 34,39 ---- test_assert( copy ( 'stopwords.base', 'stopwords' ) ); + use POSIX ":sys_wait_h"; + use POPFile::Loader; my $POPFile = POPFile::Loader->new(); *************** *** 67,71 **** if ( $x->start() == 1 ) { ! my $count = 100; while ( $x->service() && $POPFile->CORE_service( 1 ) ) { select( undef, undef, undef, 0.1 ); --- 69,73 ---- if ( $x->start() == 1 ) { ! my $count = 50; while ( $x->service() && $POPFile->CORE_service( 1 ) ) { select( undef, undef, undef, 0.1 ); *************** *** 129,136 **** -> call('POPFile/API.release_session_key', $session ); ! wait(); ! } ! # TODO : terminate child process 1; --- 131,140 ---- -> call('POPFile/API.release_session_key', $session ); ! sleep(3); ! while ( waitpid( $pid, WNOHANG ) > 0 ) { ! select( undef, undef, undef, 0.1 ); ! } ! } 1; Index: TestHTML.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestHTML.tst,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** TestHTML.tst 30 Apr 2008 14:41:49 -0000 1.42 --- TestHTML.tst 1 May 2008 15:21:44 -0000 1.43 *************** *** 144,148 **** $hi->service(); ! my $session = $b->get_session_key( 'admin', '' ); # CHILD THAT WILL RUN THE HTML INTERFACE --- 144,148 ---- $hi->service(); ! my $session = $b->get_administrator_session_key(); # CHILD THAT WILL RUN THE HTML INTERFACE *************** *** 170,173 **** --- 170,175 ---- while ( 1 ) { $h->service(); + $b->service(); + $mq->service(); if ( pipeready( $dreader ) ) { *************** *** 192,203 **** } ! if ( $command =~ /^__GETUSERCONFIG ([^_]+)_(.+)/ ) { ! my $value = $h->user_module_config_( 1, $1, $2 ); print $uwriter "OK $value\n"; next; } ! if ( $command =~ /^__SETUSERCONFIG ([^_]+)_(.+) (.+)?/ ) { ! my $value = $h->user_module_config_( 1, $1, $2, $3 ); print $uwriter "OK\n"; next; --- 194,207 ---- } ! if ( $command =~ /^__GETUSERCONFIG ([^ ]+) ([^_]+)_(.+)/ ) { ! my $userid = $b->get_user_id( $session, $1 ); ! my $value = $h->user_module_config_( $userid, $2, $3 ); print $uwriter "OK $value\n"; next; } ! if ( $command =~ /^__SETUSERCONFIG ([^ ]+) ([^_]+)_(.+) (.+)?/ ) { ! my $userid = $b->get_user_id( $session, $1 ); ! my $value = $h->user_module_config_( $userid, $2, $3, $4 ); print $uwriter "OK\n"; next; *************** *** 280,283 **** --- 284,288 ---- } } + select( undef, undef, undef, 0.05 ); } *************** *** 409,416 **** } ! if ( $line =~ /^USERCONFIGIS +([^ ]+) ?(.+)?$/ ) { ! my ( $option, $expected ) = ( $1, $2 ); $expected = '' if ( !defined( $expected ) ); ! print $dwriter "__GETUSERCONFIG $option\n"; my $reply = <$ureader>; if ( $reply =~ /^OK ([^\r\n]+)/ ) { --- 414,421 ---- } ! if ( $line =~ /^USERCONFIGIS +([^ ]+) +([^ ]+) ?(.+)?$/ ) { ! my ( $user, $option, $expected ) = ( $1, $2, $3 ); $expected = '' if ( !defined( $expected ) ); ! print $dwriter "__GETUSERCONFIG $user $option\n"; my $reply = <$ureader>; if ( $reply =~ /^OK ([^\r\n]+)/ ) { *************** *** 435,442 **** } ! if ( $line =~ /^SETUSERCONFIG +([^ ]+) ?(.+)?$/ ) { ! my ( $option, $value ) = ( $1, $2 ); $value = '' if ( !defined( $value ) ); ! print $dwriter "__SETUSERCONFIG $option $value\n"; my $reply = <$ureader>; --- 440,447 ---- } ! if ( $line =~ /^SETUSERCONFIG +([^ ]+) ([^ ]+) ?(.+)?$/ ) { ! my ( $user, $option, $value ) = ( $1, $2, $3 ); $value = '' if ( !defined( $value ) ); ! print $dwriter "__SETUSERCONFIG $user $option $value\n"; my $reply = <$ureader>; Index: TestHTML.script =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestHTML.script,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** TestHTML.script 30 Apr 2008 14:41:49 -0000 1.41 --- TestHTML.script 1 May 2008 15:21:43 -0000 1.42 *************** *** 40,46 **** # SETSUBMIT a b Just like doing SETINPUT a b followed by SUBMIT a # CONFIGIS a b Verify that config item a has value b ! # SETCONFIG a b Set config item a to b ! # USERCONFIGIS a b Verify that current user's config item a has value b ! # SETUSERCONFIG a b Set current user's config item a to b # MAGNETIS a b c Checks that magnet c exists in bucket a with type b # PARAMETERIS a b c Check that parameter b in bucket a has value c --- 40,46 ---- # SETSUBMIT a b Just like doing SETINPUT a b followed by SUBMIT a # CONFIGIS a b Verify that config item a has value b ! # SETCONFIG u a b Set config item a for user u to b ! # USERCONFIGIS u a b Verify that config item a for user u has value b ! # SETUSERCONFIG u a b Set config item a for user u to b # MAGNETIS a b c Checks that magnet c exists in bucket a with type b # PARAMETERIS a b c Check that parameter b in bucket a has value c *************** *** 160,163 **** --- 160,173 ---- MATCH Recent Messages + # Does not redirect to login page + + GET /logout + GET /administration + MATCH <input type="hidden" id="next" name="next" value="%2Fadministration" /> + GET /logout + MATCH <input type="hidden" id="next" name="next" value="%2F" /> + SETINPUT username admin + SETSUBMIT password + # Administration page (Current Active User sessions) *************** *** 329,332 **** --- 339,343 ---- </td> ENDMATCH + SETINPUT newaccount fooz:bar CLICK addaccount *************** *** 336,343 **** --- 347,359 ---- </td> ENDMATCH + SETINPUT newaccount foo:bar CLICK addaccount MATCH Failed to add the account because it is assigned to another user + SETINPUT newaccount badaccount + CLICK addaccount + MATCH The new account name must be in the form host:user + # Remove account *************** *** 349,363 **** INPUTIS parameter_history_history_days 2 ! USERCONFIGIS history_history_days 2 SETSUBMIT parameter_history_history_days 10 INPUTIS parameter_history_history_days 10 ! USERCONFIGIS history_history_days 10 SETSUBMIT parameter_history_history_days 2 INPUTIS parameter_GLOBAL_can_admin 1 ! USERCONFIGIS GLOBAL_can_admin 1 SETSUBMIT parameter_GLOBAL_can_admin 0 INPUTIS parameter_GLOBAL_can_admin 1 ! USERCONFIGIS GLOBAL_can_admin 1 GET /logout --- 365,403 ---- INPUTIS parameter_history_history_days 2 ! USERCONFIGIS admin history_history_days 2 SETSUBMIT parameter_history_history_days 10 INPUTIS parameter_history_history_days 10 ! USERCONFIGIS admin history_history_days 10 SETSUBMIT parameter_history_history_days 2 INPUTIS parameter_GLOBAL_can_admin 1 ! USERCONFIGIS admin GLOBAL_can_admin 1 SETSUBMIT parameter_GLOBAL_can_admin 0 INPUTIS parameter_GLOBAL_can_admin 1 ! USERCONFIGIS admin GLOBAL_can_admin 1 ! ! # Timeout test ! ! GET /advanced ! CONFIGIS GLOBAL_session_timeout 1800 ! INPUTIS parameter_GLOBAL_session_timeout 1800 ! SETSUBMIT parameter_GLOBAL_session_timeout 1 ! CONFIGIS GLOBAL_session_timeout 1 ! INPUTIS parameter_GLOBAL_session_timeout 1 ! ! CODE ! select( undef, undef, undef, 5 ); # wait for timeout ! ENDCODE ! ! GET /advanced ! MATCH Login ! MATCH POPFile session has been expired because a timeout period passed ! SETINPUT username admin ! SETSUBMIT password ! ! GET /advanced ! SETSUBMIT parameter_GLOBAL_session_timeout 1800 ! CONFIGIS GLOBAL_session_timeout 1800 ! INPUTIS parameter_GLOBAL_session_timeout 1800 GET /logout *************** *** 389,392 **** --- 429,437 ---- NOTMATCH <a class="shutdownLink" href="/shutdown">Shutdown POPFile</a> + # Standard user can't access the log file + + GET /popfile_current_log.log + MATCH POPFile Web Server Error 404 + # No History *************** *** 432,445 **** # Non admin users can't access these pages ! GET /administration MATCH POPFile Web Server Error 404 ! GET /users MATCH POPFile Web Server Error 404 ! GET /advanced MATCH POPFile Web Server Error 404 ! GET /shutdown MATCH POPFile Web Server Error 404 GET /logout --- 477,503 ---- # Non admin users can't access these pages ! GET /administration MATCH POPFile Web Server Error 404 ! GET /users MATCH POPFile Web Server Error 404 ! GET /advanced MATCH POPFile Web Server Error 404 ! GET /shutdown MATCH POPFile Web Server Error 404 + # Language test + + GET / + MATCH <html lang="en"> + USERCONFIGIS renameduser html_language English + SETSUBMIT language Francais + MATCH <html lang="fr"> + USERCONFIGIS renameduser html_language Francais + USERCONFIGIS admin html_language English + SETSUBMIT language English + MATCH <html lang="en"> + USERCONFIGIS renameduser html_language English + GET /logout *************** *** 624,636 **** SETSUBMIT password ! #INPUTIS usermode CONFIGIS GLOBAL_single_user 0 SETINPUT usermode on CLICK apply_stealth ! #INPUTIS usermode on CONFIGIS GLOBAL_single_user 1 NOTMATCH <a class="logoutLink" href="/logout">Logout (admin)</a> MATCH POPFile is now in the Single User Mode (POPFile classic). You are recommended to restart POPFile. # History Page --- 682,904 ---- SETSUBMIT password ! INPUTIS usermode CONFIGIS GLOBAL_single_user 0 SETINPUT usermode on CLICK apply_stealth ! INPUTIS usermode on CONFIGIS GLOBAL_single_user 1 NOTMATCH <a class="logoutLink" href="/logout">Logout (admin)</a> MATCH POPFile is now in the Single User Mode (POPFile classic). You are recommended to restart POPFile. + # Config Bar + + GET /history + + # Show/Hide Config Bar + + MATCH <a name="configBar" title="Hide configuration bar" href="/history?hide_configbar=1">Config Bar</a> + MATCH <table class="configBarBody" cellspacing="0" width="100%" summary=""> + GET /history?hide_configbar=1 + MATCH <a title="Show configuration bar" href="/history?show_configbar=1#configBar">Config Bar</a> + NOTMATCH <table class="configBarBody" cellspacing="0" width="100%" summary=""> + GET /history?show_configbar=1 + MATCH <a name="configBar" title="Hide configuration bar" href="/history?hide_configbar=1">Config Bar</a> + + # Check skin change + + MATCH <link rel="stylesheet" type="text/css" href="skins/default/style.css" media="all" title="POPFile"> + USERCONFIGIS admin html_skin default + SETSUBMIT skin oceanblue + MATCH <link rel="stylesheet" type="text/css" href="skins/oceanblue/style.css" title="POPFile-Style"> + USERCONFIGIS admin html_skin oceanblue + SETSUBMIT skin default + USERCONFIGIS admin html_skin default + + # Check language change + + MATCH <html lang="en"> + USERCONFIGIS admin html_language English + SETSUBMIT language Francais + MATCH <html lang="fr"> + USERCONFIGIS admin html_language Francais + SETSUBMIT language English + MATCH <html lang="en"> + USERCONFIGIS admin html_language English + + # Check history lines change + + INPUTIS page_size 20 + USERCONFIGIS admin html_page_size 20 + SETSUBMIT page_size 30 + INPUTIS page_size 30 + USERCONFIGIS admin html_page_size 30 + #MATCH Updated number of messages per page to 30 + SETSUBMIT page_size 0 + MATCH The page size must be a number between 1 and 1000 + INPUTIS page_size 30 + SETSUBMIT page_size 20 + USERCONFIGIS admin html_page_size 20 + + # Check history days change + + INPUTIS history_days 2 + USERCONFIGIS admin history_history_days 2 + SETSUBMIT history_days 3 + INPUTIS history_days 3 + USERCONFIGIS admin history_history_days 3 + #MATCH Updated number of days of history to 3 + SETSUBMIT history_days 0 + #MATCH The number of days in the history must be a number between 1 and 366 + INPUTIS history_days 3 + + # Add/Remove columns + + MATCH + <a href="/history?setsort=inserted" title="Sort by this column"> + <em class="historyLabelSort"> + < Arrived + </em> + </a> + ENDMATCH + MATCH + <a href="/history?setsort=from" title="Sort by this column"> + From + </a> + ENDMATCH + MATCH + <a href="/history?setsort=to" title="Sort by this column"> + To + </a> + ENDMATCH + MATCH + <a href="/history?setsort=subject" title="Sort by this column"> + Subject + </a> + ENDMATCH + MATCH + <a href="/history?setsort=bucket" title="Sort by this column"> + Bucket + </a> + ENDMATCH + MATCH + <input type="hidden" id="inserted" name="inserted"> + <input type="hidden" id="from" name="from"> + <input type="hidden" id="to" name="to"> + <span class="checkLabel"><input type="checkbox" id="cc" class="checkbox" name="cc"> <label for="cc">Cc</label> </span> + <input type="hidden" id="subject" name="subject"> + <span class="checkLabel"><input type="checkbox" id="date" class="checkbox" name="date"> <label for="date">Date</label> </span> + <span class="checkLabel"><input type="checkbox" id="size" class="checkbox" name="size"> <label for="size">Size</label> </span> + <input type="hidden" id="bucket" name="bucket"> + ENDMATCH + USERCONFIGIS admin html_columns +inserted,+from,+to,-cc,+subject,-date,-size,+bucket, + + SETINPUT date on + CLICK update_fields + MATCH + <a href="/history?setsort=date" title="Sort by this column"> + Date + </a> + ENDMATCH + MATCH + <input type="hidden" id="inserted" name="inserted"> + <input type="hidden" id="from" name="from"> + <input type="hidden" id="to" name="to"> + <span class="checkLabel"><input type="checkbox" id="cc" class="checkbox" name="cc"> <label for="cc">Cc</label> </span> + <input type="hidden" id="subject" name="subject"> + <input type="hidden" id="date" name="date"> + <span class="checkLabel"><input type="checkbox" id="size" class="checkbox" name="size"> <label for="size">Size</label> </span> + <input type="hidden" id="bucket" name="bucket"> + ENDMATCH + USERCONFIGIS admin html_columns +inserted,+from,+to,-cc,+subject,+date,-size,+bucket, + + SETINPUT size on + CLICK update_fields + MATCH + <a href="/history?setsort=size" title="Sort by this column"> + Size + </a> + ENDMATCH + MATCH + <input type="hidden" id="inserted" name="inserted"> + <input type="hidden" id="from" name="from"> + <input type="hidden" id="to" name="to"> + <span class="checkLabel"><input type="checkbox" id="cc" class="checkbox" name="cc"> <label for="cc">Cc</label> </span> + <input type="hidden" id="subject" name="subject"> + <input type="hidden" id="date" name="date"> + <input type="hidden" id="size" name="size"> + <input type="hidden" id="bucket" name="bucket"> + ENDMATCH + USERCONFIGIS admin html_columns +inserted,+from,+to,-cc,+subject,+date,+size,+bucket, + + MATCH <a class="columnRemove" href="/history?removecolumn=date"><img title="Remove column" src="skins/x.gif" border="0" alt="x"></a> + MATCH <a class="columnRemove" href="/history?removecolumn=size"><img title="Remove column" src="skins/x.gif" border="0" alt="x"></a> + + GET /history?removecolumn=date + NOTMATCH <a class="columnRemove" href="/history?removecolumn=date"><img title="Remove column" src="skins/x.gif" border="0" alt="x"></a> + MATCH <a class="columnRemove" href="/history?removecolumn=size"><img title="Remove column" src="skins/x.gif" border="0" alt="x"></a> + MATCH + <input type="hidden" id="inserted" name="inserted"> + <input type="hidden" id="from" name="from"> + <input type="hidden" id="to" name="to"> + <span class="checkLabel"><input type="checkbox" id="cc" class="checkbox" name="cc"> <label for="cc">Cc</label> </span> + <input type="hidden" id="subject" name="subject"> + <span class="checkLabel"><input type="checkbox" id="date" class="checkbox" name="date"> <label for="date">Date</label> </span> + <input type="hidden" id="size" name="size"> + <input type="hidden" id="bucket" name="bucket"> + ENDMATCH + USERCONFIGIS admin html_columns +inserted,+from,+to,-cc,+subject,-date,+size,+bucket, + + GET /history?removecolumn=size + NOTMATCH <a class="columnRemove" href="/history?removecolumn=size"><img title="Remove column" src="skins/x.gif" border="0" alt="x"></a> + MATCH + <input type="hidden" id="inserted" name="inserted"> + <input type="hidden" id="from" name="from"> + <input type="hidden" id="to" name="to"> + <span class="checkLabel"><input type="checkbox" id="cc" class="checkbox" name="cc"> <label for="cc">Cc</label> </span> + <input type="hidden" id="subject" name="subject"> + <span class="checkLabel"><input type="checkbox" id="date" class="checkbox" name="date"> <label for="date">Date</label> </span> + <span class="checkLabel"><input type="checkbox" id="size" class="checkbox" name="size"> <label for="size">Size</label> </span> + <input type="hidden" id="bucket" name="bucket"> + ENDMATCH + USERCONFIGIS admin html_columns +inserted,+from,+to,-cc,+subject,-date,-size,+bucket, + + # Move column left/right + + MATCH <a class="columnMove" href="/history?moveright=inserted"><img title="Move right" src="skins/rightarrow.gif" border="0" alt=">"></a> + MATCH <a class="columnMove" href="/history?moveleft=from"><img title="Move left" src="skins/leftarrow.gif" border="0" alt="<"></a> + GET /history?moveright=inserted + MATCH <a class="columnMove" href="/history?moveleft=inserted"><img title="Move left" src="skins/leftarrow.gif" border="0" alt="<"></a> + MATCH <a class="columnMove" href="/history?moveright=inserted"><img title="Move right" src="skins/rightarrow.gif" border="0" alt=">"></a> + NOTMATCH <a class="columnMove" href="/history?moveleft=from"><img title="Move left" src="skins/leftarrow.gif" border="0" alt="<"></a> + USERCONFIGIS admin html_columns +from,+inserted,+to,-cc,+subject,-date,-size,+bucket + + GET /history?moveleft=inserted + MATCH <a class="columnMove" href="/history?moveright=inserted"><img title="Move right" src="skins/rightarrow.gif" border="0" alt=">"></a> + MATCH <a class="columnMove" href="/history?moveleft=from"><img title="Move left" src="skins/leftarrow.gif" border="0" alt="<"></a> + NOTMATCH <a class="columnMove" href="/history?moveleft=inserted"><img title="Move left" src="skins/leftarrow.gif" border="0" alt="<"></a> + USERCONFIGIS admin html_columns +inserted,+from,+to,-cc,+subject,-date,-size,+bucket + + # Column size + + MATCH Think you've seen porn? How about a dog... + USERCONFIGIS admin html_column_characters 39 + CLICK increase + MATCH Think you've seen porn? How about a dog ... + USERCONFIGIS admin html_column_characters 40 + + CLICK decrease + MATCH Think you've seen porn? How about a dog... + USERCONFIGIS admin html_column_characters 39 + SETUSERCONFIG admin html_column_characters 6 + USERCONFIGIS admin html_column_characters 6 + CLICK decrease + CLICK decrease + MATCH Think... + USERCONFIGIS admin html_column_characters 5 + + CLICK automatic + MATCH Think you've seen porn? How about a dog ... + USERCONFIGIS admin html_column_characters 0 + # History Page *************** *** 679,682 **** --- 947,983 ---- NOTMATCH Douglas Arnold <0noy8\@worldnet.att.net> + SETSUBMIT jumptopage 1 + MATCH + Jump to page: + <b>1</b> + [<a href="/history?start_message=20&sort=-inserted">2</a>] + [<a href="/history?start_message=20&sort=-inserted">Next ></a>] + ENDMATCH + MATCH Douglas Arnold <0noy8\@worldnet.att.net> + MATCH XoSeXyGoDdEsSm\@hotmail.com + MATCH from: Leandro + + SETSUBMIT jumptopage 3 + MATCH + Jump to page: + <b>1</b> + [<a href="/history?start_message=20&sort=-inserted">2</a>] + [<a href="/history?start_message=20&sort=-inserted">Next ></a>] + ENDMATCH + MATCH Douglas Arnold <0noy8\@worldnet.att.net> + MATCH XoSeXyGoDdEsSm\@hotmail.com + MATCH from: Leandro + + SETSUBMIT jumptopage 0 + MATCH + Jump to page: + <b>1</b> + [<a href="/history?start_message=20&sort=-inserted">2</a>] + [<a href="/history?start_message=20&sort=-inserted">Next ></a>] + ENDMATCH + MATCH Douglas Arnold <0noy8\@worldnet.att.net> + MATCH XoSeXyGoDdEsSm\@hotmail.com + MATCH from: Leandro + GET /history *************** *** 740,744 **** SETSUBMIT search Doctor NOTMATCH test\@test.com ! MATCH Enlarge your package Doctor Approv... NOTMATCH Jump to page CLICK reset_filter_search --- 1041,1045 ---- SETSUBMIT search Doctor NOTMATCH test\@test.com ! MATCH Enlarge your package Doctor ApprovedNHOB... NOTMATCH Jump to page CLICK reset_filter_search *************** *** 942,945 **** --- 1243,1251 ---- MATCH 2.6727 + GET /view?view=31&text=1 + MATCH From: John + MATCH Subject: Testing Refresh + MATCH Body would go here + # Jump to message *************** *** 1216,1279 **** SETINPUT remove1 on SETINPUT remove3 on ! CLICK delete NOTMATCH "foo" NOTMATCH "bar" ! INPUTIS text1 oldstyle ! INPUTIS bucket1 personal ! INPUTIS type1 from ! INPUTIS text2 baz\@baz.com ! INPUTIS bucket2 personal ! INPUTIS type2 to NOTMATCH type3 - # Config Bar - - GET /history - - # Check skin change - - MATCH <link rel="stylesheet" type="text/css" href="skins/default/style.css" media="all" title="POPFile"> - USERCONFIGIS html_skin default - SETSUBMIT skin oceanblue - MATCH <link rel="stylesheet" type="text/css" href="skins/oceanblue/style.css" title="POPFile-Style"> - USERCONFIGIS html_skin oceanblue - SETSUBMIT skin default - USERCONFIGIS html_skin default - - # Check language change - - MATCH <html lang="en"> - USERCONFIGIS html_language English - SETSUBMIT language Francais - MATCH <html lang="fr"> - USERCONFIGIS html_language Francais - SETSUBMIT language English - MATCH <html lang="en"> - USERCONFIGIS html_language English - - # Check history lines change - - INPUTIS page_size 20 - USERCONFIGIS html_page_size 20 - SETSUBMIT page_size 30 - INPUTIS page_size 30 - USERCONFIGIS html_page_size 30 - #MATCH Updated number of messages per page to 30 - SETSUBMIT page_size 0 - MATCH The page size must be a number between 1 and 1000 - INPUTIS page_size 30 - - # Check history days change - - INPUTIS history_days 2 - USERCONFIGIS history_history_days 2 - SETSUBMIT history_days 3 - INPUTIS history_days 3 - USERCONFIGIS history_history_days 3 - #MATCH Updated number of days of history to 3 - SETSUBMIT history_days 0 - #MATCH The number of days in the history must be a number between 1 and 366 - INPUTIS history_days 3 - # Administration Page --- 1522,1536 ---- SETINPUT remove1 on SETINPUT remove3 on ! CLICK delete NOTMATCH "foo" NOTMATCH "bar" ! INPUTIS text1 oldstyle ! INPUTIS bucket1 personal ! INPUTIS type1 from ! INPUTIS text2 baz\@baz.com ! INPUTIS bucket2 personal ! INPUTIS type2 to NOTMATCH type3 # Administration Page *************** *** 1411,1422 **** INPUTIS update_check ! USERCONFIGIS html_update_check 0 SETSUBMIT update_check on INPUTIS update_check on ! USERCONFIGIS html_update_check 1 MATCH POPFile checks for updates daily SETSUBMIT update_check off INPUTIS update_check ! USERCONFIGIS html_update_check 0 MATCH POPFile does not check for updates automatically --- 1668,1679 ---- INPUTIS update_check ! USERCONFIGIS admin html_update_check 0 SETSUBMIT update_check on INPUTIS update_check on ! USERCONFIGIS admin html_update_check 1 MATCH POPFile checks for updates daily SETSUBMIT update_check off INPUTIS update_check ! USERCONFIGIS admin html_update_check 0 MATCH POPFile does not check for updates automatically *************** *** 1424,1435 **** INPUTIS send_stats ! USERCONFIGIS html_send_stats 0 SETSUBMIT send_stats on INPUTIS send_stats on MATCH POPFile sends classification statistics daily ! USERCONFIGIS html_send_stats 1 SETSUBMIT send_stats off INPUTIS send_stats ! USERCONFIGIS html_send_stats 0 MATCH POPFile does not send classification statistics --- 1681,1692 ---- INPUTIS send_stats ! USERCONFIGIS admin html_send_stats 0 SETSUBMIT send_stats on INPUTIS send_stats on MATCH POPFile sends classification statistics daily ! USERCONFIGIS admin html_send_stats 1 SETSUBMIT send_stats off INPUTIS send_stats ! USERCONFIGIS admin html_send_stats 0 MATCH POPFile does not send classification statistics *************** *** 1508,1511 **** --- 1765,1772 ---- MATCH Single User Mode Parameters + SETSUBMIT parameter_bayes_unclassified_weight 1000 + USERCONFIGIS admin bayes_unclassified_weight 1000 + INPUTIS parameter_bayes_unclassified_weight 1000 + # Buckets Page *************** *** 1796,1800 **** SETSUBMIT password secret - SETSUBMIT password secret MATCH Recent Messages --- 2057,2060 ---- *************** *** 1851,1854 **** --- 2111,2117 ---- MATCH 10 GOTO 10 + GET /popfile_current_log.log + MATCH Attempting to connect to dbi:SQLite2:dbname=../tests/popfile.db + CODE mkdir '../manual'; *************** *** 1871,1878 **** # Check update checking ! SETUSERCONFIG html_update_check 1 ! SETUSERCONFIG html_send_stats 1 ! SETUSERCONFIG html_last_update_check 0 ! SETCONFIG GLOBAL_ecount 1 GET / MATCH popfile_update.pl --- 2134,2140 ---- # Check update checking ! SETUSERCONFIG admin html_update_check 1 ! SETUSERCONFIG admin html_send_stats 1 ! SETUSERCONFIG admin html_last_update_check 0 GET / MATCH popfile_update.pl Index: TestPOP3.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestPOP3.tst,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** TestPOP3.tst 28 Apr 2008 11:48:59 -0000 1.39 --- TestPOP3.tst 1 May 2008 15:21:44 -0000 1.40 *************** *** 46,49 **** --- 46,51 ---- rmtree( 'messages' ); + use POSIX ":sys_wait_h"; + use POPFile::Loader; my $POPFile = POPFile::Loader->new(); *************** *** 478,483 **** close $server; ! exit(0) if ( $^O ne 'MSWin32' ); ! select ( undef, undef, undef, 3 ); } else { --- 480,485 ---- close $server; ! sleep(1); ! exit(0); } else { *************** *** 576,581 **** $POPFile->CORE_stop(); ! exit(0) if ( $^O ne 'MSWin32' ); ! select ( undef, undef, undef, 3 ); } else { --- 578,583 ---- $POPFile->CORE_stop(); ! sleep(1); ! exit(0); } else { *************** *** 790,794 **** $cam =~ s/msg$/cam/; ! test_assert( open RESULT, ">$messages[27]_testpop3_-got.cam" ); test_assert( open FILE, "<$cam" ); binmode FILE; --- 792,796 ---- $cam =~ s/msg$/cam/; ! test_assert( open RESULT, ">$messages[27]_testpop3-got.cam" ); test_assert( open FILE, "<$cam" ); binmode FILE; *************** *** 2162,2169 **** close $ureader; ! # while ( waitpid( $pid, &WNOHANG ) != $pid ) { ! # } ! # while ( waitpid( $pid2, &WNOHANG ) != $pid2 ) { ! # } } --- 2164,2170 ---- close $ureader; ! while ( waitpid( -1, WNOHANG ) > 0 ) { ! select( undef, undef, undef, 0.1 ); ! } } Index: TestHTTP.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestHTTP.tst,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TestHTTP.tst 9 Apr 2008 17:20:48 -0000 1.14 --- TestHTTP.tst 1 May 2008 15:21:44 -0000 1.15 *************** *** 65,68 **** --- 65,69 ---- $h->config_( 'port', $port ); $h->config_( 'local', 1 ); + $h->config_( 'cookie_cipher', 'Blowfish' ); test_assert_equal( $h->config_( 'port' ), $port ); test_assert_equal( $h->config_( 'local' ), 1 ); |