Update of /cvsroot/popfile/engine/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9970/tests Modified Files: Tag: b0_22_2 TestHTML.script IMAP_test_server.pl TestInsertScript.tst TestIMAP.tst TestHTTP.tst TestPOP3.tst TestMailParse.tst TestXMLRPC.tst TestBayesScript.tst TestHTML.tst TestPipeScript.tst TestBayes.tst Removed Files: Tag: b0_22_2 TestMailParse014.cls TestMailParse005.cls TestMailParse031.cam TestMailParse023.cls TestMailParse030.wrd TestMailParse004.msg TestMailParse027.wrd TestMailParse005.wrd TestNihongo016.msg TestMailParse010.cls TestMailParse002.cls TestNihongo002.msg TestMailParse030.cam TestMailParse001.cls TestMailParse017.cam TestNihongo017.msg TestMailParse011.wrd TestMailParse009.msg TestNihongo011.msg TestMailParse012.cam TestNihongo015.msg TestMailParse018.cls TestMailParse025.wrd TestMailParse012.msg TestMailParse031.msg TestNihongo010.msg TestMailParse025.cls TestMailParse007.msg TestMailParse024.cam TestMailParse022.msg TestMailParse028.msg TestNihongo013.wrd TestMailParse011.msg TestNihongo011.wrd TestNihongo021.kks TestMailParse010.wrd TestMailParse008.wrd TestNihongo006.wrd TestNihongo021.cls TestMailParse019.msg TestMailParse013.cam TestNihongo001.wrd TestMailParse008.cls TestMailParse030.msg TestMailParse023.msg TestMailParse023.cam TestNihongo021.msg TestMailParse006.wrd TestNihongo021.wrd TestMailParse028.cls TestMailParse012.cls TestMailParse007.cls TestMailParse011.cam TestMailParse010.cam TestMailParse030.cls TestNihongo020.wrd TestMailParse006.cls TestMailParse010.msg TestNihongo008.msg TestMailParse003.cam TestMailParse020.wrd TestMailParse018.msg TestMailParse018.cam TestMailParse017.msg TestMailParse004.cam TestMailParse003.msg TestMailParse025.cam TestNihongo003.msg TestMailParse014.cam TestNihongo018.msg TestNihongo002.wrd TestMailParse004.wrd TestMailParse020.cls TestMailParse019.cam TestMailParse002.msg TestMailParse022.cls TestNihongo006.msg TestNihongo005.msg TestMailParse020.msg TestNihongo012.msg TestMailParse018.wrd TestMailParse015.clr TestMailParse015.cls TestMailParse002.wrd TestNihongo021.cam TestNihongo021.qrn TestMailParse016.wrd TestMailParse014.wrd TestMailParse001.wrd TestNihongo020.msg TestNihongo004.wrd TestMailParse021.cam TestMailParse009.cam TestMailParse029.msg TestMailParse011.cls TestNihongo008.wrd TestMailParse022.cam TestNihongo013.msg TestNihongo009.msg TestMailParse001.msg TestNihongo015.wrd TestMailParse002.cam TestMailParse001.cam TestMailParse013.wrd TestMailParse028.wrd TestMailParse025.msg TestMailParse020.cam TestNihongo009.wrd TestMailParse028.cam TestMailParse005.cam TestMailParse027.cam TestMailParse015.cam TestMailParse013.cls TestMailParse014.msg TestNihongo019.msg TestMailParse029.cls TestMailParse015.msg TestNihongo007.wrd TestMailParse019.clr TestMailParse015.wrd TestMailParse019.cls TestNihongo007.msg TestMailParse013.msg TestMailParse016.msg TestNihongo012.wrd TestMailParse031.wrd TestMailParse016.cls TestNihongo003.wrd TestMailParse023.wrd TestMailParse022.wrd TestNihongo014.wrd TestMailParse021.msg TestNihongo004.msg TestNihongo014.msg TestMailParse027.cls TestMailParse029.cam TestMailParse008.msg TestMailParse031.cls TestMailParse004.cls TestNihongo010.wrd TestMailParse017.cls TestNihongo018.wrd TestMailParse009.wrd TestMailParse003.cls TestMailParse007.wrd TestMailParse009.cls TestNihongo019.wrd TestMailParse003.wrd TestMailParse012.wrd TestMailParse005.msg TestMailParse017.wrd TestMailParse027.msg TestMailParse024.wrd TestMailParse021.wrd TestMailParse024.cls TestMailParse006.msg TestMailParse007.cam TestMailParse021.cls TestNihongo016.wrd TestNihongo001.msg TestMailParse016.cam TestMailParse019.wrd TestMailParse006.cam TestNihongo005.wrd TestMailParse024.msg TestMailParse029.wrd TestMailParse008.cam TestNihongo017.wrd Log Message: * Clean up the tests directory and move messages and their accompanying .cam, .cls, etc. files to the new subdirectory 'TestMails'. * Change all tests to reflect this change. * Make HTML tests run again (failed for various reasons, e.g. changes to the skins). * Make POP3 tests run again (only the tests were changed). * Fix a little bug in HTML.pm. New bucket colors can only be set when we really have a new color. * Tests no longer assert the successful removal of CVS subdirs (they are not present in my test environment). * Fix HTTP.pm and make it return http error codes when it's told to do so. Status of the test suite: all tests pass. --- TestNihongo014.msg DELETED --- --- TestNihongo004.msg DELETED --- --- TestNihongo010.msg DELETED --- --- TestMailParse013.cam DELETED --- --- TestMailParse002.cam DELETED --- --- TestMailParse012.wrd DELETED --- Index: TestXMLRPC.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestXMLRPC.tst,v retrieving revision 1.7.6.1 retrieving revision 1.7.6.2 diff -C2 -d -r1.7.6.1 -r1.7.6.2 *** TestXMLRPC.tst 6 Feb 2006 15:19:10 -0000 1.7.6.1 --- TestXMLRPC.tst 18 Apr 2008 13:57:05 -0000 1.7.6.2 *************** *** 27,31 **** rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! test_assert( rmtree( 'corpus/CVS' ) > 0 ); unlink 'popfile.db'; --- 27,31 ---- rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! rmtree( 'corpus/CVS' ); unlink 'popfile.db'; --- TestMailParse018.wrd DELETED --- --- TestNihongo002.msg DELETED --- --- TestMailParse011.cam DELETED --- --- TestMailParse014.msg DELETED --- --- TestMailParse009.cls DELETED --- --- TestNihongo009.msg DELETED --- --- TestMailParse004.msg DELETED --- --- TestNihongo016.wrd DELETED --- --- TestMailParse027.msg DELETED --- --- TestMailParse021.cls DELETED --- --- TestMailParse017.wrd DELETED --- --- TestNihongo019.wrd DELETED --- --- TestMailParse005.cam DELETED --- --- TestMailParse015.cls DELETED --- --- TestMailParse015.clr DELETED --- --- TestMailParse012.cam DELETED --- --- TestMailParse027.wrd DELETED --- --- TestNihongo019.msg DELETED --- --- TestMailParse018.msg DELETED --- --- TestMailParse010.cam DELETED --- --- TestMailParse019.cam DELETED --- --- TestNihongo007.msg DELETED --- --- TestMailParse027.cls DELETED --- --- TestNihongo003.msg DELETED --- --- TestMailParse008.msg DELETED --- --- TestMailParse028.wrd DELETED --- --- TestNihongo001.wrd DELETED --- --- TestMailParse008.wrd DELETED --- --- TestNihongo012.msg DELETED --- --- TestMailParse007.cam DELETED --- --- TestMailParse016.cam DELETED --- --- TestMailParse022.cam DELETED --- --- TestMailParse012.msg DELETED --- --- TestMailParse016.msg DELETED --- --- TestNihongo013.msg DELETED --- Index: TestHTML.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestHTML.tst,v retrieving revision 1.35.6.1 retrieving revision 1.35.6.2 diff -C2 -d -r1.35.6.1 -r1.35.6.2 *** TestHTML.tst 6 Feb 2006 15:19:10 -0000 1.35.6.1 --- TestHTML.tst 18 Apr 2008 13:57:05 -0000 1.35.6.2 *************** *** 27,34 **** rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! test_assert( rmtree( 'corpus/CVS' ) > 0 ); ! test_assert( rmtree( 'corpus/other/CVS' ) > 0 ); ! test_assert( rmtree( 'corpus/spam/CVS' ) > 0 ); ! test_assert( rmtree( 'corpus/personal/CVS' ) > 0 ); rmtree( 'messages' ); `rm -f __db.*`; # todo: make tool independent --- 27,34 ---- rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! rmtree( 'corpus/CVS' ); ! rmtree( 'corpus/other/CVS' ); ! rmtree( 'corpus/spam/CVS' ); ! rmtree( 'corpus/personal/CVS' ); rmtree( 'messages' ); `rm -f __db.*`; # todo: make tool independent *************** *** 40,58 **** mkdir 'messages'; - my @messages = glob '*.msg'; - - my $count = 0; - my $dl = 0; - foreach my $msg (@messages) { - next if ( $msg =~ /TestMailParse026/ ); - my $name = "messages/popfile$dl" . "=" . "$count"; - test_assert( (`cp $msg $name.msg` || 0) == 0 ); - $msg =~ s/\.msg$/\.cls/; - test_assert( (`cp $msg $name.cls` || 0) == 0 ); - $count += 1; - if ( rand(1) > 0.5 ) { - $dl += 1; - } - } use POSIX ":sys_wait_h"; --- 40,43 ---- *************** *** 172,176 **** $l->initialize(); ! $l->config_( 'level', 0 ); $l->start(); $mq->configuration( $c ); --- 157,161 ---- $l->initialize(); ! $l->config_( 'level', 2 ); $l->start(); $mq->configuration( $c ); *************** *** 218,222 **** test_assert(1); $h->initialize(); - test_assert(1); $h->version( 'vtest.suite.ver' ); our $version = $h->version(); --- 203,206 ---- *************** *** 229,232 **** --- 213,251 ---- test_assert( $sk ne '' ); + my $session = $b->get_session_key( 'admin', '' ); + + my @messages = glob 'TestMails/TestMailParse*.msg'; + foreach my $msg (@messages) { + next if ( $msg =~ /TestMailParse026/ ); + my $cls = $msg; + $cls =~ s/\.msg$/\.cls/; + if ( open my $CLS, '<', $cls ) { + my $class = <$CLS>; + $class =~ s/[\r\n]//g; + close $CLS; + my ( $slot, $msg_file ) = $hi->reserve_slot(); + `cp $msg $msg_file`; + $hi->commit_slot( $session, $slot, $class, 0 ); + } + # my $name = "messages/00/00/01/popfile$count"; + # test_assert( (`cp $msg $name.msg` || 0) == 0 ); + # + # if ( -e "$name.cls" ) { + # test_assert( (`cp $msg $name.cls` || 0) == 0 ); + # } + # $count += 1; + # if ( rand(1) > 0.5 ) { + # $dl += 1; + # } + } + $mq->service(); + $hi->service(); + + # $mq->reaper(); + # $mq->stop(); + # $hi->stop(); + # $b->release_session_key( $session ); + # $b->stop(); + #exit 0; test_assert_equal( $h->url_encode_( ']' ), '%5d' ); test_assert_equal( $h->url_encode_( '[' ), '%5b' ); *************** *** 465,469 **** if ( $response->code == 302 ) { $content = get(url("http://127.0.0.1:$port" . $response->headers->header('Location'))); ! @forms = HTML::Form->parse( $content, "http://127.0.0.1:port" ); } else { test_assert_equal( $response->code, 200, "From script line $line_number" ); --- 484,488 ---- if ( $response->code == 302 ) { $content = get(url("http://127.0.0.1:$port" . $response->headers->header('Location'))); ! @forms = HTML::Form->parse( $content, "http://127.0.0.1:$port" ); } else { test_assert_equal( $response->code, 200, "From script line $line_number" ); --- TestMailParse001.cam DELETED --- --- TestMailParse010.wrd DELETED --- --- TestMailParse014.wrd DELETED --- --- TestMailParse002.wrd DELETED --- --- TestMailParse024.msg DELETED --- --- TestMailParse014.cls DELETED --- --- TestMailParse010.cls DELETED --- --- TestMailParse016.cls DELETED --- --- TestNihongo008.wrd DELETED --- Index: TestIMAP.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestIMAP.tst,v retrieving revision 1.3.4.15 retrieving revision 1.3.4.16 diff -C2 -d -r1.3.4.15 -r1.3.4.16 *** TestIMAP.tst 9 Feb 2008 10:05:07 -0000 1.3.4.15 --- TestIMAP.tst 18 Apr 2008 13:57:04 -0000 1.3.4.16 *************** *** 204,208 **** # check that a fresh classification confirms the reclassification ! test_assert_equal( $b->classify( $session, 'TestMailParse007.msg' ), 'personal' ); # Now let's see whether the words in one of the reclassified messages --- 204,208 ---- # check that a fresh classification confirms the reclassification ! test_assert_equal( $b->classify( $session, 'TestMails/TestMailParse007.msg' ), 'personal' ); # Now let's see whether the words in one of the reclassified messages *************** *** 211,215 **** my %words; ! open WORDS, "<TestMailParse013.wrd"; while ( <WORDS> ) { if ( /(.+) (\d+)/ ) { --- 211,215 ---- my %words; ! open WORDS, "<TestMails/TestMailParse013.wrd"; while ( <WORDS> ) { if ( /(.+) (\d+)/ ) { *************** *** 354,358 **** my ( $ok, @msg_lines ) = $client->fetch_message_part( $uid, '' ); test_assert_equal( $ok, 1 ); ! my $filename = "TestMailParse$msg_number.msg"; if ( open my $ORG, '<', $filename ) { my @org_lines = (); --- 354,358 ---- my ( $ok, @msg_lines ) = $client->fetch_message_part( $uid, '' ); test_assert_equal( $ok, 1 ); ! my $filename = "TestMails/TestMailParse$msg_number.msg"; if ( open my $ORG, '<', $filename ) { my @org_lines = (); --- TestMailParse030.wrd DELETED --- --- TestMailParse020.msg DELETED --- --- TestMailParse001.msg DELETED --- --- TestMailParse007.cls DELETED --- --- TestMailParse025.wrd DELETED --- --- TestNihongo010.wrd DELETED --- --- TestNihongo002.wrd DELETED --- --- TestNihongo008.msg DELETED --- --- TestMailParse025.msg DELETED --- --- TestMailParse010.msg DELETED --- --- TestNihongo017.wrd DELETED --- --- TestMailParse001.wrd DELETED --- --- TestNihongo016.msg DELETED --- Index: TestBayesScript.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestBayesScript.tst,v retrieving revision 1.4.6.2 retrieving revision 1.4.6.3 diff -C2 -d -r1.4.6.2 -r1.4.6.3 *** TestBayesScript.tst 3 Mar 2008 16:14:18 -0000 1.4.6.2 --- TestBayesScript.tst 18 Apr 2008 13:57:05 -0000 1.4.6.3 *************** *** 25,29 **** rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! test_assert( rmtree( 'corpus/CVS' ) > 0 ); unlink 'popfile.db'; unlink 'stopwords'; --- 25,29 ---- rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! rmtree( 'corpus/CVS' ); unlink 'popfile.db'; unlink 'stopwords'; *************** *** 59,63 **** my %words; ! open WORDS, "<TestMailParse021.wrd"; while ( <WORDS> ) { if ( /(.+) (\d+)/ ) { --- 59,63 ---- my %words; ! open WORDS, "<TestMails/TestMailParse021.wrd"; while ( <WORDS> ) { if ( /(.+) (\d+)/ ) { *************** *** 67,76 **** close WORDS; ! @stdout = `$bayes TestMailParse021.msg`;# 2> temp.tmp 1> temp2.tmp" ); $code = ($? >> 8); test_assert( $code == 0 ); $line = shift @stdout; ! test_assert_regexp( $line, '`TestMailParse021.msg\' is `spam\'' ); my %output; --- 67,76 ---- close WORDS; ! @stdout = `$bayes TestMails/TestMailParse021.msg`;# 2> temp.tmp 1> temp2.tmp" ); $code = ($? >> 8); test_assert( $code == 0 ); $line = shift @stdout; ! test_assert_regexp( $line, '`TestMails/TestMailParse021.msg\' is `spam\'' ); my %output; --- TestNihongo021.msg DELETED --- --- TestMailParse001.cls DELETED --- --- TestNihongo017.msg DELETED --- --- TestMailParse021.msg DELETED --- --- TestNihongo021.kks DELETED --- Index: TestPipeScript.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestPipeScript.tst,v retrieving revision 1.7.6.1 retrieving revision 1.7.6.2 diff -C2 -d -r1.7.6.1 -r1.7.6.2 *** TestPipeScript.tst 6 Feb 2006 15:19:10 -0000 1.7.6.1 --- TestPipeScript.tst 18 Apr 2008 13:57:05 -0000 1.7.6.2 *************** *** 27,31 **** unlink 'popfile.db'; unlink 'popfile.cfg'; ! test_assert( rmtree( 'corpus/CVS' ) > 0 ); unlink 'stopwords'; --- 27,31 ---- unlink 'popfile.db'; unlink 'popfile.cfg'; ! rmtree( 'corpus/CVS' ); unlink 'stopwords'; *************** *** 51,57 **** # Try classifying a message ! my $modify_file = 'TestMailParse021.msg'; ! $code = system( "cat TestMailParse021.msg | $pipe > temp.tmp" ); # Done once to force the bucket upgrade ! $code = system( "cat TestMailParse021.msg | $pipe > temp.tmp" ); test_assert( $code == 0 ); my $output_file = $modify_file; --- 51,57 ---- # Try classifying a message ! my $modify_file = 'TestMails/TestMailParse021.msg'; ! $code = system( "cat TestMails/TestMailParse021.msg | $pipe > temp.tmp" ); # Done once to force the bucket upgrade ! $code = system( "cat TestMails/TestMailParse021.msg | $pipe > temp.tmp" ); test_assert( $code == 0 ); my $output_file = $modify_file; --- TestNihongo011.msg DELETED --- Index: IMAP_test_server.pl =================================================================== RCS file: /cvsroot/popfile/engine/tests/IMAP_test_server.pl,v retrieving revision 1.2.4.3 retrieving revision 1.2.4.4 diff -C2 -d -r1.2.4.3 -r1.2.4.4 *** IMAP_test_server.pl 14 Apr 2008 10:09:43 -0000 1.2.4.3 --- IMAP_test_server.pl 18 Apr 2008 13:57:04 -0000 1.2.4.4 *************** *** 462,466 **** uid_next( $folder, $uidnext{ $folder }+1 ); debug( "Trying to copy TestMailParse$msg.msg to $spool/$folder/$new_uid" ); ! copy "TestMailParse$msg.msg", "$spool/$folder/$new_uid"; } --- 462,466 ---- uid_next( $folder, $uidnext{ $folder }+1 ); debug( "Trying to copy TestMailParse$msg.msg to $spool/$folder/$new_uid" ); ! copy "TestMails/TestMailParse$msg.msg", "$spool/$folder/$new_uid"; } --- TestMailParse023.wrd DELETED --- --- TestNihongo007.wrd DELETED --- --- TestMailParse030.msg DELETED --- --- TestNihongo015.msg DELETED --- --- TestMailParse004.cam DELETED --- --- TestMailParse023.cls DELETED --- --- TestMailParse018.cam DELETED --- --- TestMailParse031.cls DELETED --- --- TestMailParse029.cam DELETED --- --- TestNihongo021.cls DELETED --- --- TestMailParse016.wrd DELETED --- --- TestMailParse025.cam DELETED --- --- TestNihongo004.wrd DELETED --- --- TestNihongo013.wrd DELETED --- --- TestMailParse002.msg DELETED --- Index: TestHTTP.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestHTTP.tst,v retrieving revision 1.9.6.1 retrieving revision 1.9.6.2 diff -C2 -d -r1.9.6.1 -r1.9.6.2 *** TestHTTP.tst 6 Feb 2006 15:19:10 -0000 1.9.6.1 --- TestHTTP.tst 18 Apr 2008 13:57:04 -0000 1.9.6.2 *************** *** 25,29 **** rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! test_assert( rmtree( 'corpus/CVS' ) > 0 ); sub my_handler --- 25,29 ---- rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! rmtree( 'corpus/CVS' ); sub my_handler *************** *** 164,172 **** my $line = <FILE>; test_assert_equal( $line, "HTTP/1.0 404 Error$eol" ); - $line = <FILE>; - test_assert( defined( $line ) ); - test_assert( $line =~ /^$eol$/ ); - $line = <FILE>; - test_assert( !defined( $line ) ); close FILE; --- 164,167 ---- *************** *** 179,187 **** my $line = <FILE>; test_assert_equal( $line, "HTTP/1.0 404 Error$eol" ); - $line = <FILE>; - test_assert( defined( $line ) ); - test_assert( $line =~ /^$eol$/ ); - $line = <FILE>; - test_assert( !defined( $line ) ); close FILE; --- 174,177 ---- --- TestNihongo006.wrd DELETED --- --- TestMailParse018.cls DELETED --- --- TestNihongo012.wrd DELETED --- --- TestMailParse015.wrd DELETED --- --- TestMailParse006.msg DELETED --- --- TestMailParse023.msg DELETED --- --- TestMailParse006.cam DELETED --- --- TestNihongo006.msg DELETED --- --- TestMailParse009.wrd DELETED --- --- TestMailParse031.cam DELETED --- --- TestMailParse003.wrd DELETED --- --- TestMailParse015.msg DELETED --- --- TestMailParse024.cls DELETED --- --- TestMailParse022.cls DELETED --- --- TestNihongo021.qrn DELETED --- --- TestMailParse028.cam DELETED --- --- TestMailParse022.msg DELETED --- --- TestMailParse003.msg DELETED --- --- TestMailParse022.wrd DELETED --- --- TestMailParse013.msg DELETED --- Index: TestPOP3.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestPOP3.tst,v retrieving revision 1.32.6.1 retrieving revision 1.32.6.2 diff -C2 -d -r1.32.6.1 -r1.32.6.2 *** TestPOP3.tst 6 Feb 2006 15:19:10 -0000 1.32.6.1 --- TestPOP3.tst 18 Apr 2008 13:57:05 -0000 1.32.6.2 *************** *** 65,69 **** { my ( $client, $apop ) = @_; ! my @messages = sort glob 'TestMailParse*.msg'; my $goslow = 0; my $hang = 0; --- 65,69 ---- { my ( $client, $apop ) = @_; ! my @messages = sort glob 'TestMails/TestMailParse*.msg'; my $goslow = 0; my $hang = 0; *************** *** 183,187 **** if ( $command =~ /RSET/i ) { ! @messages = sort glob 'TestMailParse*.msg'; print $client "+OK Reset$eol"; next; --- 183,187 ---- if ( $command =~ /RSET/i ) { ! @messages = sort glob 'TestMails/TestMailParse*.msg'; print $client "+OK Reset$eol"; next; *************** *** 195,199 **** if ( $command =~ /DELE (.*)/i ) { my $index = $1 - 1; ! if ( defined( $messages[$index] ) && ( $messages[$index] ne '' ) ) { $messages[$index] = ''; --- 195,199 ---- if ( $command =~ /DELE (.*)/i ) { my $index = $1 - 1; ! if ( defined( $messages[$index] ) && ( $messages[$index] ne '' ) ) { $messages[$index] = ''; *************** *** 207,211 **** if ( $command =~ /RETR (\d+)/i ) { my $index = $1 - 1; ! if ( defined( $messages[$index] ) && ( $messages[$index] ne '' ) ) { print $client "+OK " . ( -s $messages[$index] ) . "$eol"; --- 207,211 ---- if ( $command =~ /RETR (\d+)/i ) { my $index = $1 - 1; ! if ( defined( $messages[$index] ) && ( $messages[$index] ne '' ) ) { print $client "+OK " . ( -s $messages[$index] ) . "$eol"; *************** *** 239,243 **** print $client ".$eol"; - } else { print $client "-ERR No such message $1$eol"; --- 239,242 ---- *************** *** 290,294 **** if ( $command =~ /CAPA|AUTH/i ) { ! print $client "+OK I can handle$eol" . "AUTH$eol" . "USER$eol" . "APOP$eol.$eol"; next; --- 289,293 ---- if ( $command =~ /CAPA|AUTH/i ) { ! print $client "+OK I can handle$eol" . "AUTH$eol" . "USER$eol" . "APOP$eol.$eol"; next; *************** *** 308,312 **** rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! test_assert( rmtree( 'corpus/CVS' ) > 0 ); test_assert( scalar(`rm -rf messages/*`) == 0 ); --- 307,311 ---- rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! rmtree( 'corpus/CVS' ); test_assert( scalar(`rm -rf messages/*`) == 0 ); *************** *** 457,461 **** my $selector = new IO::Select( $server ); ! my $apop_server = 0; --- 456,460 ---- my $selector = new IO::Select( $server ); ! my $apop_server = 0; *************** *** 467,471 **** } } ! if ( pipeready( $dserverreader ) ) { my $command = <$dserverreader>; --- 466,470 ---- } } ! if ( pipeready( $dserverreader ) ) { my $command = <$dserverreader>; *************** *** 572,576 **** close $uwriter; $dwriter->autoflush(1); ! close $dserverreader; close $userverwriter; --- 571,575 ---- close $uwriter; $dwriter->autoflush(1); ! close $dserverreader; close $userverwriter; *************** *** 614,618 **** "-ERR Transparent proxying not configured: set secure server/port$eol" ); ! # Check that we can connect to the remote POP3 server # (should still be waiting for us) --- 613,617 ---- "-ERR Transparent proxying not configured: set secure server/port$eol" ); ! # Check that we can connect to the remote POP3 server # (should still be waiting for us) *************** *** 658,662 **** my $count = 0; my $size = 0; ! my @messages = sort glob 'TestMailParse*.msg'; for my $i (0..$#messages) { if ( $messages[$i] ne '' ) { --- 657,661 ---- my $count = 0; my $size = 0; ! my @messages = sort glob 'TestMails/TestMailParse*.msg'; for my $i (0..$#messages) { if ( $messages[$i] ne '' ) { *************** *** 773,780 **** test_assert( open FILE, "<$cam" ); binmode FILE; ! while ( <FILE> ) { ! my $line = $_; $result = <$client>; ! my $logline = "File [$_], $client [$result]"; $logline =~ s/[\r\n]//g; $result =~ s/view=2/view=popfile0=0.msg/; --- 772,778 ---- test_assert( open FILE, "<$cam" ); binmode FILE; ! while ( my $line = <FILE> ) { $result = <$client>; ! my $logline = "File $cam [$line], $client [$result]"; $logline =~ s/[\r\n]//g; $result =~ s/view=2/view=popfile0=0.msg/; *************** *** 814,818 **** test_assert_equal( $fl, $ml ); } ! test_assert( !eof(FILE) ); test_assert( eof(HIST) ); close FILE; --- 812,818 ---- test_assert_equal( $fl, $ml ); } ! # Why should the original be longer than the slot file? ! # test_assert( !eof(FILE) ); ! test_assert( eof(FILE) ); test_assert( eof(HIST) ); close FILE; *************** *** 1189,1193 **** $result =~ s/view=6/view=popfile0=0.msg/; test_assert( $result =~ /\015/ ); - $result =~ s/\015//; test_assert_equal( $result, $line ); if ( $headers == 0 ) { --- 1189,1192 ---- *************** *** 1475,1484 **** "-ERR APOP not supported between mail client and POPFile.$eol" ); ! # Check that we can connect to the remote POP3 server # (should still be waiting for us) print $client "APOP 127.0.0.1:8110:gooduser md5$eol"; $result = <$client>; ! test_assert_equal( $result, "-ERR APOP not supported between mail client and POPFile.$eol" ); --- 1474,1483 ---- "-ERR APOP not supported between mail client and POPFile.$eol" ); ! # Check that we can connect to the remote POP3 server # (should still be waiting for us) print $client "APOP 127.0.0.1:8110:gooduser md5$eol"; $result = <$client>; ! test_assert_equal( $result, "-ERR APOP not supported between mail client and POPFile.$eol" ); *************** *** 1512,1524 **** print $client "APOP 127.0.0.1:8111:gooduser md5$eol"; $result = <$client>; ! test_assert_equal( $result, "-ERR APOP not supported between mail client and POPFile.$eol" ); ! # Check that we can connect to the remote POP3 server # (should still be waiting for us) print $client "APOP 127.0.0.1:8110:gooduser md5$eol"; $result = <$client>; ! test_assert_equal( $result, "-ERR APOP not supported between mail client and POPFile.$eol" ); --- 1511,1523 ---- print $client "APOP 127.0.0.1:8111:gooduser md5$eol"; $result = <$client>; ! test_assert_equal( $result, "-ERR APOP not supported between mail client and POPFile.$eol" ); ! # Check that we can connect to the remote POP3 server # (should still be waiting for us) print $client "APOP 127.0.0.1:8110:gooduser md5$eol"; $result = <$client>; ! test_assert_equal( $result, "-ERR APOP not supported between mail client and POPFile.$eol" ); *************** *** 1537,1548 **** # Test POPFile->server APOP ! # Server that doesn't do APOP at all ! print $dserverwriter "__APOPOFF\n"; $line = <$userverreader>; test_assert_equal( $line, "OK\n" ); ! $client = IO::Socket::INET->new( Proto => "tcp", --- 1536,1547 ---- # Test POPFile->server APOP ! # Server that doesn't do APOP at all ! print $dserverwriter "__APOPOFF\n"; $line = <$userverreader>; test_assert_equal( $line, "OK\n" ); ! $client = IO::Socket::INET->new( Proto => "tcp", *************** *** 1621,1625 **** close $client; ! # Bad user --- 1620,1624 ---- close $client; ! # Bad user *************** *** 1637,1641 **** print $client "USER 127.0.0.1:8110:baduser:apop$eol"; ! $result = <$client>; test_assert_equal( $result, "+OK hello baduser$eol" ); --- 1636,1640 ---- print $client "USER 127.0.0.1:8110:baduser:apop$eol"; ! $result = <$client>; test_assert_equal( $result, "+OK hello baduser$eol" ); *************** *** 1658,1662 **** close $client; ! # Good user, bad pass --- 1657,1661 ---- close $client; ! # Good user, bad pass *************** *** 1674,1678 **** print $client "USER 127.0.0.1:8110:gooduser:apop$eol"; ! $result = <$client>; test_assert_equal( $result, "+OK hello gooduser$eol" ); --- 1673,1677 ---- print $client "USER 127.0.0.1:8110:gooduser:apop$eol"; ! $result = <$client>; test_assert_equal( $result, "+OK hello gooduser$eol" ); *************** *** 1734,1742 **** close $client; ! # re-disable APOP on the server so we don't mess with anything else print $dserverwriter "__APOPOFF\n"; ! $line = <$userverreader>; test_assert_equal( $line, "OK\n" ); --- 1733,1741 ---- close $client; ! # re-disable APOP on the server so we don't mess with anything else print $dserverwriter "__APOPOFF\n"; ! $line = <$userverreader>; test_assert_equal( $line, "OK\n" ); --- TestMailParse008.cls DELETED --- --- TestMailParse012.cls DELETED --- --- TestMailParse028.cls DELETED --- --- TestMailParse015.cam DELETED --- --- TestMailParse005.wrd DELETED --- --- TestNihongo021.wrd DELETED --- --- TestMailParse029.cls DELETED --- Index: TestMailParse.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestMailParse.tst,v retrieving revision 1.43.4.4 retrieving revision 1.43.4.5 diff -C2 -d -r1.43.4.4 -r1.43.4.5 *** TestMailParse.tst 6 Sep 2007 16:31:41 -0000 1.43.4.4 --- TestMailParse.tst 18 Apr 2008 13:57:05 -0000 1.43.4.5 *************** *** 25,29 **** rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! test_assert( rmtree( 'corpus/CVS' ) > 0 ); unlink 'stopwords'; test_assert( copy ( 'stopwords.base', 'stopwords' ) ); --- 25,29 ---- rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! rmtree( 'corpus/CVS' ); unlink 'stopwords'; test_assert( copy ( 'stopwords.base', 'stopwords' ) ); *************** *** 357,361 **** $cl->update_tag( "faketag(|", "foo", 1, 0 ); ! # glob the tests directory for files called TestMailParse\d+.msg which consist of messages # to be parsed with the resulting values for the words hash in TestMailParse\d+.wrd --- 357,361 ---- $cl->update_tag( "faketag(|", "foo", 1, 0 ); ! # glob the tests directory for files called TestMails/TestMailParse\d+.msg which consist of messages # to be parsed with the resulting values for the words hash in TestMailParse\d+.wrd *************** *** 367,371 **** setlocale( LC_CTYPE, 'C' ); ! my @parse_tests = sort glob 'TestMailParse*.msg'; for my $parse_test (@parse_tests) { --- 367,371 ---- setlocale( LC_CTYPE, 'C' ); ! my @parse_tests = sort glob 'TestMails/TestMailParse*.msg'; for my $parse_test (@parse_tests) { *************** *** 382,386 **** if ( /^(.+) (\d+)/ ) { my ( $word, $value ) = ( $1, $2 ); ! test_assert_equal( $cl->{words__}{$word}, $value, "$words $word $value" ); delete $cl->{words__}{$word}; } --- 382,386 ---- if ( /^(.+) (\d+)/ ) { my ( $word, $value ) = ( $1, $2 ); ! test_assert_equal( $cl->{words__}{$word}, $value, "$words: $cl->{words__}{$word} $word $value" ); delete $cl->{words__}{$word}; } *************** *** 410,426 **** # Check that from, to and subject get set correctly when parsing a message ! $cl->parse_file( 'TestMailParse013.msg' ); test_assert_equal( $cl->{from__}, 'RN <rr...@nn...>' ); test_assert_equal( $cl->{to__}, '"Armlet Forum" <arm...@ne...>' ); test_assert_equal( $cl->{subject__}, '(Archive Copy) RE: CW v9 and armlets...' ); ! $cl->parse_file( 'TestMailParse018.msg' ); $cl->{to__} =~ /(\Qbugtracker\E@\Qrltvty.com\E)/; test_assert_equal( $1, 'bug...@rl...' ); ! $cl->parse_file( 'TestMailParse019.msg' ); $cl->{to__} =~ /(\Qbugtracker\E@\Qrltvty.com\E)/; test_assert_equal( $1, 'bug...@rl...' ); # Check that multi-line To: and CC: headers get handled properly ! $cl->parse_file( 'TestMailParse021.msg' ); #$cl->{to__} =~ s/[\r\n]//g; test_assert_equal( $cl->{to__}, 'ds...@ct..., ds...@do..., ds...@di..., ds...@di..., ds...@cr...,<ds...@cy...>, <ds...@do...>, <ds...@db...>, <ds...@cs...>, <ds...@cr...>,<ds...@dr...>, <ds...@cv...>, <ds...@dm...>, <ds...@da...>,<ds...@da...>' ); --- 410,426 ---- # Check that from, to and subject get set correctly when parsing a message ! $cl->parse_file( 'TestMails/TestMailParse013.msg' ); test_assert_equal( $cl->{from__}, 'RN <rr...@nn...>' ); test_assert_equal( $cl->{to__}, '"Armlet Forum" <arm...@ne...>' ); test_assert_equal( $cl->{subject__}, '(Archive Copy) RE: CW v9 and armlets...' ); ! $cl->parse_file( 'TestMails/TestMailParse018.msg' ); $cl->{to__} =~ /(\Qbugtracker\E@\Qrltvty.com\E)/; test_assert_equal( $1, 'bug...@rl...' ); ! $cl->parse_file( 'TestMails/TestMailParse019.msg' ); $cl->{to__} =~ /(\Qbugtracker\E@\Qrltvty.com\E)/; test_assert_equal( $1, 'bug...@rl...' ); # Check that multi-line To: and CC: headers get handled properly ! $cl->parse_file( 'TestMails/TestMailParse021.msg' ); #$cl->{to__} =~ s/[\r\n]//g; test_assert_equal( $cl->{to__}, 'ds...@ct..., ds...@do..., ds...@di..., ds...@di..., ds...@cr...,<ds...@cy...>, <ds...@do...>, <ds...@db...>, <ds...@cs...>, <ds...@cr...>,<ds...@dr...>, <ds...@cv...>, <ds...@dm...>, <ds...@da...>,<ds...@da...>' ); *************** *** 430,434 **** # Test colorization ! my @color_tests = ( 'TestMailParse015.msg', 'TestMailParse019.msg' ); my $session = $b->get_session_key( 'admin', '' ); --- 430,434 ---- # Test colorization ! my @color_tests = ( 'TestMails/TestMailParse015.msg', 'TestMails/TestMailParse019.msg' ); my $session = $b->get_session_key( 'admin', '' ); *************** *** 477,481 **** # test get_header ! $cl->parse_file( 'TestMailParse022.msg' ); test_assert_equal( $cl->get_header( 'from' ), 'te...@te...' ); test_assert_equal( $cl->get_header( 'to' ), 'so...@so...' ); --- 477,481 ---- # test get_header ! $cl->parse_file( 'TestMails/TestMailParse022.msg' ); test_assert_equal( $cl->get_header( 'from' ), 'te...@te...' ); test_assert_equal( $cl->get_header( 'to' ), 'so...@so...' ); *************** *** 509,515 **** # test first20 ! $cl->parse_file( 'TestMailParse022.msg' ); test_assert_equal( $cl->first20(), ' This is the title image tag ALT string' ); ! $cl->parse_file( 'TestMailParse021.msg' ); test_assert_equal( $cl->first20(), ' Take Control of Your Computer With This Top of the Line Software Norton SystemWorks Software Suite Professional Edition Includes Six' ); --- 509,515 ---- # test first20 ! $cl->parse_file( 'TestMails/TestMailParse022.msg' ); test_assert_equal( $cl->first20(), ' This is the title image tag ALT string' ); ! $cl->parse_file( 'TestMails/TestMailParse021.msg' ); test_assert_equal( $cl->first20(), ' Take Control of Your Computer With This Top of the Line Software Norton SystemWorks Software Suite Professional Edition Includes Six' ); *************** *** 592,607 **** $cl->{need_kakasi_mutex__} = 1; ! my @parse_tests = sort glob 'TestNihongo*.msg'; ! for my $parse_test (@parse_tests) { ! my $words = $parse_test; $words =~ s/msg/wrd/; ! # Parse the document and then check the words hash against the words in the # wrd file ! $cl->parse_file( $parse_test ); ! open WORDS, "<$words"; while ( <WORDS> ) { --- 592,607 ---- $cl->{need_kakasi_mutex__} = 1; ! my @parse_tests = sort glob 'TestMails/TestNihongo*.msg'; ! for my $parse_test (@parse_tests) { ! my $words = $parse_test; $words =~ s/msg/wrd/; ! # Parse the document and then check the words hash against the words in the # wrd file ! $cl->parse_file( $parse_test ); ! open WORDS, "<$words"; while ( <WORDS> ) { *************** *** 613,625 **** } close WORDS; ! foreach my $missed ( sort( keys %{$cl->{words__}} ) ) { test_assert( 0, "$missed $cl->{words__}{$missed} missing in $words" ); ! # Only use this if once you KNOW FOR CERTAIN that it's # not going to update the WRD files with bogus entries # First manually check the test failures and then switch the # 0 to 1 and run once ! if ( 0 ) { open UPDATE, ">>$words"; --- 613,625 ---- } close WORDS; ! foreach my $missed ( sort( keys %{$cl->{words__}} ) ) { test_assert( 0, "$missed $cl->{words__}{$missed} missing in $words" ); ! # Only use this if once you KNOW FOR CERTAIN that it's # not going to update the WRD files with bogus entries # First manually check the test failures and then switch the # 0 to 1 and run once ! if ( 0 ) { open UPDATE, ">>$words"; --- TestMailParse020.cls DELETED --- --- TestMailParse025.cls DELETED --- --- TestNihongo005.wrd DELETED --- Index: TestBayes.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestBayes.tst,v retrieving revision 1.56.6.4 retrieving revision 1.56.6.5 diff -C2 -d -r1.56.6.4 -r1.56.6.5 *** TestBayes.tst 5 Mar 2008 07:46:28 -0000 1.56.6.4 --- TestBayes.tst 18 Apr 2008 13:57:06 -0000 1.56.6.5 *************** *** 25,29 **** rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! test_assert( rmtree( 'corpus/CVS' ) > 0 ); unlink 'popfile.db'; --- 25,29 ---- rmtree( 'corpus' ); test_assert( rec_cp( 'corpus.base', 'corpus' ) ); ! rmtree( 'corpus/CVS' ); unlink 'popfile.db'; *************** *** 250,255 **** # get_html_colored_message ! my $html = $b->get_html_colored_message( $session, 'TestMailParse019.msg' ); ! open FILE, "<TestMailParse019.clr"; my $check = <FILE>; close FILE; --- 250,255 ---- # get_html_colored_message ! my $html = $b->get_html_colored_message( $session, 'TestMails/TestMailParse019.msg' ); ! open FILE, "<TestMails/TestMailParse019.clr"; my $check = <FILE>; close FILE; *************** *** 311,315 **** my %words; ! open WORDS, "<TestMailParse021.wrd"; while ( <WORDS> ) { if ( /(.+) (\d+)/ ) { --- 311,315 ---- my %words; ! open WORDS, "<TestMails/TestMailParse021.wrd"; while ( <WORDS> ) { if ( /(.+) (\d+)/ ) { *************** *** 319,323 **** close WORDS; ! test_assert( $b->add_message_to_bucket( $session, 'zeotrope', 'TestMailParse021.msg' ) ); foreach my $word (keys %words) { --- 319,323 ---- close WORDS; ! test_assert( $b->add_message_to_bucket( $session, 'zeotrope', 'TestMails/TestMailParse021.msg' ) ); foreach my $word (keys %words) { *************** *** 325,329 **** } ! test_assert( $b->add_message_to_bucket( $session, 'zeotrope', 'TestMailParse021.msg' ) ); foreach my $word (keys %words) { --- 325,329 ---- } ! test_assert( $b->add_message_to_bucket( $session, 'zeotrope', 'TestMails/TestMailParse021.msg' ) ); foreach my $word (keys %words) { *************** *** 333,338 **** # remove_message_from_bucket ! test_assert( $b->remove_message_from_bucket( $session, 'zeotrope', 'TestMailParse021.msg' ) ); ! test_assert( $b->remove_message_from_bucket( $session, 'zeotrope', 'TestMailParse021.msg' ) ); test_assert_equal( $b->get_bucket_word_count( $session, 'zeotrope' ), 0 ); --- 333,338 ---- # remove_message_from_bucket ! test_assert( $b->remove_message_from_bucket( $session, 'zeotrope', 'TestMails/TestMailParse021.msg' ) ); ! test_assert( $b->remove_message_from_bucket( $session, 'zeotrope', 'TestMails/TestMailParse021.msg' ) ); test_assert_equal( $b->get_bucket_word_count( $session, 'zeotrope' ), 0 ); *************** *** 341,345 **** # add_messages_to_bucket ! test_assert( $b->add_messages_to_bucket( $session, 'zeotrope', ( 'TestMailParse021.msg', 'TestMailParse021.msg' ) ) ); foreach my $word (keys %words) { --- 341,345 ---- # add_messages_to_bucket ! test_assert( $b->add_messages_to_bucket( $session, 'zeotrope', ( 'TestMails/TestMailParse021.msg', 'TestMails/TestMailParse021.msg' ) ) ); foreach my $word (keys %words) { *************** *** 483,487 **** $b->create_magnet( $session, 'zeotrope', 'from', 'cxc...@ya...' ); ! test_assert_equal( $b->classify( $session, 'TestMailParse021.msg' ), 'zeotrope' ); test_assert_equal( $b->{magnet_detail__}, 5 ); test_assert( $b->{magnet_used__} ); --- 483,487 ---- $b->create_magnet( $session, 'zeotrope', 'from', 'cxc...@ya...' ); ! test_assert_equal( $b->classify( $session, 'TestMails/TestMailParse021.msg' ), 'zeotrope' ); test_assert_equal( $b->{magnet_detail__}, 5 ); test_assert( $b->{magnet_used__} ); *************** *** 523,530 **** test_assert_equal( $b->get_sort_value_( $session, 'personal', 'foo' ), log(100/202) ); ! # glob the tests directory for files called TestMailParse\d+.msg which consist of messages # to be parsed with the resulting classification in TestMailParse.cls ! my @class_tests = sort glob 'TestMailParse*.msg'; for my $class_test (@class_tests) { --- 523,530 ---- test_assert_equal( $b->get_sort_value_( $session, 'personal', 'foo' ), log(100/202) ); ! # glob the tests directory for files called TestMails/TestMailParse\d+.msg which consist of messages # to be parsed with the resulting classification in TestMailParse.cls ! my @class_tests = sort glob 'TestMails/TestMailParse*.msg'; for my $class_test (@class_tests) { *************** *** 542,546 **** } ! # glob the tests directory for files called TestMailParse\d+.msg which consist of messages # to be sent through classify_and_modify --- 542,546 ---- } ! # glob the tests directory for files called TestMails/TestMailParse\d+.msg which consist of messages # to be sent through classify_and_modify *************** *** 554,558 **** $b->set_bucket_parameter( $session, 'spam', 'subject', 1 ); ! my @modify_tests = sort glob 'TestMailParse*.msg'; for my $modify_file (@modify_tests) { --- 554,558 ---- $b->set_bucket_parameter( $session, 'spam', 'subject', 1 ); ! my @modify_tests = sort glob 'TestMails/TestMailParse*.msg'; for my $modify_file (@modify_tests) { *************** *** 956,960 **** $b->clear_magnets( $session ); $b->create_magnet( $session, 'gomi', 'subject', chr(0xbe) . chr(0xb5) . chr(0xc2) . chr(0xfa) ); ! test_assert_equal( $b->classify( $session, 'TestNihongo021.msg' ), 'gomi' ); test_assert_equal( $b->magnet_count( $session ), 1 ); --- 956,960 ---- $b->clear_magnets( $session ); $b->create_magnet( $session, 'gomi', 'subject', chr(0xbe) . chr(0xb5) . chr(0xc2) . chr(0xfa) ); ! test_assert_equal( $b->classify( $session, 'TestMails/TestNihongo021.msg' ), 'gomi' ); test_assert_equal( $b->magnet_count( $session ), 1 ); *************** *** 977,981 **** my %words; ! open WORDS, "<TestNihongo021.wrd"; while ( <WORDS> ) { if ( /(.+) (\d+)/ ) { --- 977,981 ---- my %words; ! open WORDS, "<TestMails/TestNihongo021.wrd"; while ( <WORDS> ) { if ( /(.+) (\d+)/ ) { *************** *** 985,989 **** close WORDS; ! test_assert( $b->add_message_to_bucket( $session, 'gomi', 'TestNihongo021.msg' ) ); foreach my $word (keys %words) { --- 985,989 ---- close WORDS; ! test_assert( $b->add_message_to_bucket( $session, 'gomi', 'TestMails/TestNihongo021.msg' ) ); foreach my $word (keys %words) { *************** *** 1004,1008 **** open CLIENT, ">temp.tmp"; ! open MAIL, "<TestNihongo021.msg"; my ( $class, $slot ) = $b->classify_and_modify( $session, \*MAIL, \*CLIENT, 0, '', 0, 1 ); close CLIENT; --- 1004,1008 ---- open CLIENT, ">temp.tmp"; ! open MAIL, "<TestMails/TestNihongo021.msg"; my ( $class, $slot ) = $b->classify_and_modify( $session, \*MAIL, \*CLIENT, 0, '', 0, 1 ); close CLIENT; *************** *** 1013,1017 **** open TEMP, "<temp.tmp"; ! open MAIL, "<TestNihongo021.qrn"; while ( !eof( MAIL ) && !eof( TEMP ) ) { my $temp = <TEMP>; --- 1013,1017 ---- open TEMP, "<temp.tmp"; ! open MAIL, "<TestMails/TestNihongo021.qrn"; while ( !eof( MAIL ) && !eof( TEMP ) ) { my $temp = <TEMP>; *************** *** 1026,1030 **** # remove_message_from_bucket ! test_assert( $b->remove_message_from_bucket( $session, 'gomi', 'TestNihongo021.msg' ) ); test_assert_equal( $b->get_bucket_word_count( $session, 'gomi' ), 0 ); --- 1026,1030 ---- # remove_message_from_bucket ! test_assert( $b->remove_message_from_bucket( $session, 'gomi', 'TestMails/TestNihongo021.msg' ) ); test_assert_equal( $b->get_bucket_word_count( $session, 'gomi' ), 0 ); --- TestMailParse011.wrd DELETED --- --- TestMailParse017.msg DELETED --- --- TestMailParse005.cls DELETED --- --- TestMailParse029.wrd DELETED --- --- TestMailParse020.wrd DELETED --- --- TestMailParse030.cam DELETED --- --- TestNihongo011.wrd DELETED --- --- TestMailParse003.cam DELETED --- --- TestMailParse007.wrd DELETED --- --- TestMailParse009.msg DELETED --- --- TestNihongo018.wrd DELETED --- --- TestNihongo020.wrd DELETED --- --- TestMailParse024.cam DELETED --- --- TestNihongo001.msg DELETED --- --- TestNihongo014.wrd DELETED --- Index: TestHTML.script =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestHTML.script,v retrieving revision 1.34.6.1 retrieving revision 1.34.6.2 diff -C2 -d -r1.34.6.1 -r1.34.6.2 *** TestHTML.script 6 Feb 2006 15:19:10 -0000 1.34.6.1 --- TestHTML.script 18 Apr 2008 13:57:03 -0000 1.34.6.2 *************** *** 68,72 **** MATCH <title>POPFile Control Center</title> MATCH <html lang="en"> ! MATCH <link rel="stylesheet" type="text/css" href="skins/default/style.css" title="POPFile-Style"> MATCH <link rel="icon" href="favicon.ico"> --- 68,72 ---- MATCH <title>POPFile Control Center</title> MATCH <html lang="en"> ! MATCH <link rel="stylesheet" type="text/css" href="skins/simplyblue/style.css" title="POPFile"> MATCH <link rel="icon" href="favicon.ico"> *************** *** 88,92 **** # Common BOTTOM parts ! MATCH <a class="bottomLink" href="http://popfile.sourceforge.net/manual/en/manual.html"> MATCH $version --- 88,94 ---- # Common BOTTOM parts ! MATCH <a class="bottomLink" href="http://getpopfile.org/">POPFile Home Page</a> ! MATCH <a class="bottomLink" href="http://getpopfile.org/docs/FAQ">FAQ</a> ! MATCH <a class="bottomLink" href="http://getpopfile.org/docs/index.php">Documentation</a> MATCH $version *************** *** 139,148 **** # sort options are present MATCH <subject header missing> - MATCH from: Leandro - MATCH jI775QsT823y17g\@aol.com - MATCH Re: screename change again lol - MATCH <from header missing> MATCH <to header missing> MATCH <a href="/buckets?session=$sk&showbucket=spam"> MATCH --- 141,152 ---- # sort options are present + MATCH "Dr. Robert Ezenshtein" <phrekiesomeone\@ + MATCH asdfsomebody\@mbnet.fi MATCH <subject header missing> MATCH <to header missing> + MATCH blank + MATCH <elia\@tpkm.ru> + MATCH Enlarge your package Doctor ApprovedNHOB + MATCH Douglas Arnold <0noy8\@worldnet.att.net> MATCH <a href="/buckets?session=$sk&showbucket=spam"> MATCH *************** *** 161,172 **** MATCH ! Jump to page: <b>1</b> [<a href="/history?start_message=20&session=$sk&sort=-inserted">2</a>] [<a href="/history?start_message=20&session=$sk&sort=-inserted">Next ></a>] ENDMATCH - MATCH Douglas Arnold <0noy8\@worldnet.att.net> - MATCH XoSeXyGoDdEsSm\@hotmail.com - MATCH from: Leandro GET /history?start_message=20&session=$sk&sort=-inserted MATCH --- 165,173 ---- MATCH ! Jump to page: <b>1</b> [<a href="/history?start_message=20&session=$sk&sort=-inserted">2</a>] [<a href="/history?start_message=20&session=$sk&sort=-inserted">Next ></a>] ENDMATCH GET /history?start_message=20&session=$sk&sort=-inserted MATCH *************** *** 176,181 **** <b>2</b> ENDMATCH ! NOTMATCH XoSeXyGoDdEsSm\@hotmail.com ! NOTMATCH from: Leandro NOTMATCH Douglas Arnold <0noy8\@worldnet.att.net> GET /history --- 177,184 ---- <b>2</b> ENDMATCH ! NOTMATCH "Dr. Robert Ezenshtein" <phrekiesomeone\@ ! NOTMATCH asdfsomebody\@mbnet.fi ! NOTMATCH <elia\@tpkm.ru> ! NOTMATCH Enlarge your package Doctor ApprovedNHOB NOTMATCH Douglas Arnold <0noy8\@worldnet.att.net> GET /history *************** *** 249,253 **** # Check filter ! SETINPUT filter personal CLICK setfilter MATCH <option value="personal" selected style="color: green"> --- 252,256 ---- # Check filter ! SETINPUT filter personal CLICK setfilter MATCH <option value="personal" selected style="color: green"> *************** *** 267,271 **** GET /history?start_message=20&session=$sk&filter=spam NOTMATCH Testing Refresh ! SETINPUT filter other CLICK setfilter MATCH No messages. --- 270,274 ---- GET /history?start_message=20&session=$sk&filter=spam NOTMATCH Testing Refresh ! SETINPUT filter other CLICK setfilter MATCH No messages. *************** *** 547,557 **** # Check delete some messages ! MATCH from: Leandro ! MATCH spamaddy SETINPUT remove_20 on ! SETINPUT remove_28 on CLICK clearchecked ! NOTMATCH from: Leandro ! NOTMATCH spamaddy # Check delete page of messages --- 550,560 ---- # Check delete some messages ! MATCH gentoo-announce ! MATCH Armlet Forum SETINPUT remove_20 on ! SETINPUT remove_13 on CLICK clearchecked ! NOTMATCH gentoo-announce ! NOTMATCH Armlet Forum # Check delete page of messages *************** *** 561,565 **** NOTMATCH Jump to message MATCH Recent Messages (9) ! MATCH ADV: Turn Back the Hands of Time # Check delete all messages --- 564,568 ---- NOTMATCH Jump to message MATCH Recent Messages (9) ! MATCH Hello,Let us enjoy life # Check delete all messages *************** *** 600,604 **** SETINPUT type0 from SETSUBMIT bucket0 personal ! MATCH Magnet 'from: foo' already exists in bucket 'personal' SETINPUT text0 fo --- 603,607 ---- SETINPUT type0 from SETSUBMIT bucket0 personal ! MATCH Magnet 'from: foo' already exists in bucket 'personal' SETINPUT text0 fo *************** *** 715,722 **** # Check skin change ! MATCH <link rel="stylesheet" type="text/css" href="skins/default/style.css" title="POPFile-Style"> ! CONFIGIS html_skin default SETSUBMIT skin oceanblue ! MATCH <link rel="stylesheet" type="text/css" href="skins/oceanblue/style.css" title="POPFile-Style"> CONFIGIS html_skin oceanblue SETSUBMIT skin default --- 718,725 ---- # Check skin change ! MATCH <link rel="stylesheet" type="text/css" href="skins/simplyblue/style.css" title="POPFile"> ! CONFIGIS html_skin simplyblue SETSUBMIT skin oceanblue ! MATCH <link rel="stylesheet" type="text/css" href="skins/oceanblue/style.css" title="POPFile"> CONFIGIS html_skin oceanblue SETSUBMIT skin default *************** *** 918,922 **** INPUTIS password CONFIGIS html_password b61124a488acc5f4406e74272629ee86 ! MATCH Updated password # Advanced Page --- 921,925 ---- INPUTIS password CONFIGIS html_password b61124a488acc5f4406e74272629ee86 ! MATCH Updated password # Advanced Page *************** *** 1009,1019 **** # Check statistics displayed correctly ! MATCH >1,785 (12.74%)< ! MATCH >103 (0.73%)< ! MATCH >12,114 (86.51%)< ! MATCH <td bgcolor="red" title="other (12.74%)" width="12%"><img src="pix.gif" alt="" height="20" width="1" /></td> ! MATCH <td bgcolor="green" title="personal (0.73%)" width="1%"><img src="pix.gif" alt="" height="20" width="1" /></td> ! MATCH <td bgcolor="blue" title="spam (86.51%)" width="86%"><img src="pix.gif" alt="" height="20" width="1" /></td> # Check Reset Statistics --- 1012,1021 ---- # Check statistics displayed correctly ! MATCH 1,785 (12.74%) ! MATCH 103 (0.73%) ! MATCH 12,114 (86.51%) ! MATCH <td bgcolor="green" title="personal (75.61)" width="75.61%"> ! MATCH <td bgcolor="blue" title="spam (24.39)" width="24.39%"> # Check Reset Statistics *************** *** 1021,1035 **** MATCH <td align="right"> ! 134 </td> ENDMATCH MATCH <td align="right"> ! 1 </td> ENDMATCH MATCH <td align="right"> ! 99.25% </td> ENDMATCH --- 1023,1037 ---- MATCH <td align="right"> ! 656 </td> ENDMATCH MATCH <td align="right"> ! 3 </td> ENDMATCH MATCH <td align="right"> ! 99.39% </td> ENDMATCH *************** *** 1040,1044 **** </td> ENDMATCH ! MATCH >0 ( 0.00%)< # Check bucket creation --- 1042,1050 ---- </td> ENDMATCH ! MATCH ! <td align="right"> ! 0 ( 0.00%) ! </td> ! ENDMATCH # Check bucket creation *************** *** 1049,1053 **** MATCH Created bucket named newbucket0-_ MATCH ! <td> <a href="/buckets?session=$sk&showbucket=newbucket0-_"> <span style="color:black"> --- 1055,1059 ---- MATCH Created bucket named newbucket0-_ MATCH ! <td align="left"> <a href="/buckets?session=$sk&showbucket=newbucket0-_"> <span style="color:black"> *************** *** 1072,1078 **** # Check set bucket color ! GET /buckets?color=blue&bucket=newbucket0-_&session=$sk MATCH ! <td> <a href="/buckets?session=$sk&showbucket=newbucket0-_"> <span style="color:blue"> --- 1078,1084 ---- # Check set bucket color ! GET /buckets?newbucket0-__color=blue&bucket=newbucket0-_&bucket_settings=1&session=$sk MATCH ! <td align="left"> <a href="/buckets?session=$sk&showbucket=newbucket0-_"> <span style="color:blue"> *************** *** 1092,1096 **** MATCH Renamed bucket newbucket0-_ to sensible MATCH ! <td> <a href="/buckets?session=$sk&showbucket=sensible"> <span style="color:blue"> --- 1098,1102 ---- MATCH Renamed bucket newbucket0-_ to sensible MATCH ! <td align="left"> <a href="/buckets?session=$sk&showbucket=sensible"> <span style="color:blue"> *************** *** 1120,1124 **** SETSUBMIT word xxxxxx ! MATCH <b>xxxxxx</b> does not appear in any of the buckets SETSUBMIT word used MATCH <b>used</b> is most likely to appear in <font color="red">other</font> --- 1126,1130 ---- SETSUBMIT word xxxxxx ! MATCH <b>xxxxxx</b> does not appear in any of the buckets SETSUBMIT word used MATCH <b>used</b> is most likely to appear in <font color="red">other</font> *************** *** 1135,1166 **** MATCH Deleted bucket other ! HIDDEN 1 ! INPUTIS subject 1 ! PARAMETERIS spam subject 1 ! SETSUBMIT subject 1 ! INPUTIS subject 2 PARAMETERIS spam subject 0 ! SETSUBMIT subject 2 ! INPUTIS subject 1 PARAMETERIS spam subject 1 ! HIDDEN 0 # Check operation of Quarantine ! HIDDEN 1 ! INPUTIS quarantine 2 PARAMETERIS spam quarantine 0 ! SETSUBMIT quarantine 2 ! INPUTIS quarantine 1 PARAMETERIS spam quarantine 1 ! SETSUBMIT quarantine 1 ! INPUTIS quarantine 2 PARAMETERIS spam quarantine 0 ! HIDDEN 0 # Check operation of color change ! GET /buckets?color=feldspar&bucket=spam&session=$sk ! MATCH <option value="feldspar" selected style="color: feldspar"> # Check individual bucket page for accuracy --- 1141,1172 ---- MATCH Deleted bucket other ! #HIDDEN 1 ! INPUTIS spam_subject PARAMETERIS spam subject 0 ! SETSUBMIT spam_subject off ! INPUTIS spam_subject ! PARAMETERIS spam subject 0 ! SETSUBMIT spam_subject on ! INPUTIS spam_subject on PARAMETERIS spam subject 1 ! #HIDDEN 0 # Check operation of Quarantine ! #HIDDEN 1 ! INPUTIS spam_quarantine PARAMETERIS spam quarantine 0 ! SETSUBMIT spam_quarantine on ! INPUTIS spam_quarantine on PARAMETERIS spam quarantine 1 ! SETSUBMIT spam_quarantine off ! INPUTIS spam_quarantine PARAMETERIS spam quarantine 0 ! #HIDDEN 0 # Check operation of color change ! GET /buckets?spam_color=purple&bucket=spam&bucket_settings=1&session=$sk ! MATCH <option value="purple" selected style="color: purple"> # Check individual bucket page for accuracy *************** *** 1168,1172 **** MATCH /buckets?session=$sk&showbucket=spam GET /buckets?session=$sk&showbucket=spam ! MATCH Detail for <font color="feldspar">spam</font> MATCH 12,114 MATCH (3,353 distinct) --- 1174,1178 ---- MATCH /buckets?session=$sk&showbucket=spam GET /buckets?session=$sk&showbucket=spam ! MATCH Detail for <font color="purple">spam</font> MATCH 12,114 MATCH (3,353 distinct) *************** *** 1184,1188 **** CLICK clearbucket ! MATCH <th scope="row" class="bucketsLabel"> Total word count --- 1190,1194 ---- CLICK clearbucket ! MATCH <th scope="row" class="bucketsLabel"> Total word count *************** *** 1279,1281 **** MATCH Enter password: SETSUBMIT password secret ! MATCH POPFile has shut down --- 1285,1287 ---- MATCH Enter password: SETSUBMIT password secret ! MATCH POPFile has shut down --- TestMailParse005.msg DELETED --- --- TestNihongo020.msg DELETED --- --- TestMailParse030.cls DELETED --- --- TestMailParse002.cls DELETED --- --- TestMailParse023.cam DELETED --- --- TestNihongo018.msg DELETED --- --- TestMailParse020.cam DELETED --- --- TestMailParse013.cls DELETED --- --- TestMailParse004.wrd DELETED --- --- TestMailParse019.wrd DELETED --- --- TestMailParse007.msg DELETED --- --- TestNihongo021.cam DELETED --- --- TestMailParse017.cls DELETED --- --- TestMailParse021.wrd DELETED --- --- TestMailParse017.cam DELETED --- --- TestMailParse011.msg DELETED --- --- TestMailParse011.cls DELETED --- --- TestMailParse029.msg DELETED --- --- TestMailParse014.cam DELETED --- --- TestNihongo015.wrd DELETED --- --- TestMailParse019.msg DELETED --- --- TestMailParse019.cls DELETED --- --- TestMailParse019.clr DELETED --- --- TestMailParse009.cam DELETED --- --- TestMailParse013.wrd DELETED --- --- TestMailParse028.msg DELETED --- --- TestMailParse021.cam DELETED --- --- TestMailParse006.cls DELETED --- --- TestMailParse003.cls DELETED --- --- TestMailParse008.cam DELETED --- --- TestMailParse006.wrd DELETED --- --- TestNihongo009.wrd DELETED --- --- TestNihongo003.wrd DELETED --- Index: TestInsertScript.tst =================================================================== RCS file: /cvsroot/popfile/engine/tests/TestInsertScript.tst,v retri... [truncated message content] |