|
From: <jgr...@us...> - 2003-07-31 23:16:53
|
Update of /cvsroot/popfile/engine/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv3653/tests
Modified Files:
TestPOP3.tst
Log Message:
Tests for various odd POP3 conditions like connecting and then sending a QUIT
Index: TestPOP3.tst
===================================================================
RCS file: /cvsroot/popfile/engine/tests/TestPOP3.tst,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TestPOP3.tst 31 Jul 2003 22:24:13 -0000 1.6
--- TestPOP3.tst 31 Jul 2003 23:04:34 -0000 1.7
***************
*** 331,335 ****
my $now = time;
! while ( $p->service() && ( ( $now + 5 ) > time ) ) {
}
--- 331,335 ----
my $now = time;
! while ( $p->service() && ( ( $now + 10 ) > time ) ) {
}
***************
*** 633,636 ****
--- 633,640 ----
test_assert_equal( $magnet, '' );
+ # TODO Test basic TOP capability with toptoo gets classification
+ # TODO Test RETR after TOP comes from cache
+ # TODO Test TOP after TOP comes from cache
+
# Check that we echo the remote servers QUIT response
***************
*** 641,651 ****
close $client;
! # TODO QUIT straight after connect
! # TODO odd command straight after connect gives error
! # TODO -pop3_toptoo tests with caching behavior
! # TODO SPA/AUTH tests with good, bad and missing remote servers
while ( waitpid( $pid, &WNOHANG ) != $pid ) {
--- 645,724 ----
close $client;
! # Test QUIT straight after connect
! my $client = IO::Socket::INET->new(
! Proto => "tcp",
! PeerAddr => 'localhost',
! PeerPort => $port );
! test_assert( defined( $client ) );
! test_assert( $client->connected );
! my $result = <$client>;
! test_assert_equal( $result, "+OK POP3 POPFile (test suite) server ready$eol" );
!
! print $client "QUIT$eol";
! $result = <$client>;
! test_assert_equal( $result, "+OK goodbye$eol" );
!
! close $client;
!
! # Test odd command straight after connect gives error
!
! my $client = IO::Socket::INET->new(
! Proto => "tcp",
! PeerAddr => 'localhost',
! PeerPort => $port );
!
! test_assert( defined( $client ) );
! test_assert( $client->connected );
!
! my $result = <$client>;
! test_assert_equal( $result, "+OK POP3 POPFile (test suite) server ready$eol" );
!
! print $client "FOOF$eol";
! $result = <$client>;
! test_assert_equal( $result, "-ERR unknown command or bad syntax$eol" );
!
! print $client "QUIT$eol";
! $result = <$client>;
! test_assert_equal( $result, "+OK goodbye$eol" );
!
! close $client;
!
! # TODO the APOP command
!
! # Test SPA/AUTH commands with no secure server specified
!
! my $client = IO::Socket::INET->new(
! Proto => "tcp",
! PeerAddr => 'localhost',
! PeerPort => $port );
!
! test_assert( defined( $client ) );
! test_assert( $client->connected );
!
! my $result = <$client>;
! test_assert_equal( $result, "+OK POP3 POPFile (test suite) server ready$eol" );
!
! print $client "CAPA$eol";
! $result = <$client>;
! test_assert_equal( $result, "-ERR No secure server specified$eol" );
!
! print $client "AUTH$eol";
! $result = <$client>;
! test_assert_equal( $result, "-ERR No secure server specified$eol" );
!
! print $client "AUTH username$eol";
! $result = <$client>;
! test_assert_equal( $result, "-ERR No secure server specified$eol" );
!
! print $client "QUIT$eol";
! $result = <$client>;
! test_assert_equal( $result, "+OK goodbye$eol" );
!
! close $client;
!
! # TODO SPA/AUTH tests with good, bad servers
while ( waitpid( $pid, &WNOHANG ) != $pid ) {
|