r54303 - in /branches/upstream/libnet-imap-simple-perl/current: Changes MANIFEST META.yml Makefile.PL Simple.pm contrib/search-test.pl t/11_mailboxes.t t/22_copy_multiple.t t/22_delete_multiple.t t/23_delete_multiple.t t/test_server.pm

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sun Mar 14 15:56:41 UTC 2010


Author: jawnsy-guest
Date: Sun Mar 14 15:56:33 2010
New Revision: 54303

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54303
Log:
[svn-upgrade] Integrating new upstream version, libnet-imap-simple-perl (1.1911)

Added:
    branches/upstream/libnet-imap-simple-perl/current/contrib/search-test.pl   (with props)
    branches/upstream/libnet-imap-simple-perl/current/t/11_mailboxes.t
    branches/upstream/libnet-imap-simple-perl/current/t/23_delete_multiple.t
Removed:
    branches/upstream/libnet-imap-simple-perl/current/t/22_delete_multiple.t
Modified:
    branches/upstream/libnet-imap-simple-perl/current/Changes
    branches/upstream/libnet-imap-simple-perl/current/MANIFEST
    branches/upstream/libnet-imap-simple-perl/current/META.yml
    branches/upstream/libnet-imap-simple-perl/current/Makefile.PL
    branches/upstream/libnet-imap-simple-perl/current/Simple.pm
    branches/upstream/libnet-imap-simple-perl/current/t/22_copy_multiple.t
    branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm

Modified: branches/upstream/libnet-imap-simple-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/Changes?rev=54303&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/Changes (original)
+++ branches/upstream/libnet-imap-simple-perl/current/Changes Sun Mar 14 15:56:33 2010
@@ -1,3 +1,22 @@
+1.1911: Sun Mar 14 2010
+   - Fixed [introduced] bugs illuminated in #55552 (RT), thanks
+     to Aaron Wilson <aaron at gmx.co.uk> for a positively excellent
+     bug report!
+
+1.1910_2: Wed Feb 17 2010
+   - http://www.nntp.perl.org/group/perl.cpan.testers/2010/02/msg6764802.html
+     - I still can't figure out what's causing this... NO IDEA
+     - I made the test ridiculously verbose if two conditions are
+       met: 1) automated testing; 2) the copy tests fail in some
+       way.
+
+1.1910_1: Sun Jan 17 2010
+   - http://www.nntp.perl.org/group/perl.cpan.testers/2010/01/msg6625605.html
+     It seems the t/22_* tests are failing, but I can't seem to
+     build a perl for which the tests fail. :(  No idea.
+     I added another prereq to the makefile and added another
+     line (perhaps informative?) to the t/22_copy* test.
+
 1.1910: Tue Oct 27 2009
    - documented search() and added a bunch of kid functions that
      issue searches on your behalf.  Added tests for search().

Modified: branches/upstream/libnet-imap-simple-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/MANIFEST?rev=54303&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/MANIFEST (original)
+++ branches/upstream/libnet-imap-simple-perl/current/MANIFEST Sun Mar 14 15:56:33 2010
@@ -15,6 +15,7 @@
 contrib/hand_test01.pl
 contrib/imap.pl
 contrib/preauth-pipe-server.pl
+contrib/search-test.pl
 contrib/status.pl
 inc/Net/IMAP/Server.pm
 inc/Net/IMAP/Server/Command.pm
@@ -59,10 +60,11 @@
 t/07_select_and_examine.t
 t/08_selectalot.t
 t/09_concurrent_connections_new.t
+t/11_mailboxes.t
 t/15_flags.t
 t/17_status_and_select.t
 t/22_copy_multiple.t
-t/22_delete_multiple.t
+t/23_delete_multiple.t
 t/35_imap_results_in_message_body.t
 t/40_preauth.t
 t/45_search.t

Modified: branches/upstream/libnet-imap-simple-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/META.yml?rev=54303&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/META.yml (original)
+++ branches/upstream/libnet-imap-simple-perl/current/META.yml Sun Mar 14 15:56:33 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Net-IMAP-Simple
-version:            1.1910
+version:            1.1911
 abstract:           ~
 author:
     - Paul Miller <jettero at cpan.org>
@@ -17,6 +17,7 @@
     Email::MIME::ContentType:  0
     Email::Simple:        1.999
     Encode::IMAPUTF7:     0
+    List::MoreUtils:      0
     MIME::Base64:         0
     Net::Server::Coro:    0.3
     Net::SSLeay:          0
@@ -35,7 +36,7 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.54
+generated_by:       ExtUtils::MakeMaker version 6.56
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libnet-imap-simple-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/Makefile.PL?rev=54303&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/Makefile.PL (original)
+++ branches/upstream/libnet-imap-simple-perl/current/Makefile.PL Sun Mar 14 15:56:33 2010
@@ -37,6 +37,7 @@
                     'Email::Simple'               => 1.999,
                     'Encode::IMAPUTF7'            => 0,
                     'MIME::Base64'                => 0,
+                    'List::MoreUtils'             => 0,
                     'Net::SSLeay'                 => 0,
                     'Net::Server::Coro'           => 0.3,
                     'Regexp::Common'              => 0,

Modified: branches/upstream/libnet-imap-simple-perl/current/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/Simple.pm?rev=54303&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/Simple.pm (original)
+++ branches/upstream/libnet-imap-simple-perl/current/Simple.pm Sun Mar 14 15:56:33 2010
@@ -8,7 +8,7 @@
 use IO::Socket;
 use IO::Select;
 
-our $VERSION = "1.1910";
+our $VERSION = "1.1911";
 
 BEGIN {
     # I'd really rather the pause/cpan indexers miss this "package"
@@ -682,16 +682,16 @@
         # recurse, should probably follow
         # RFC 2683: 3.2.1.1.  Listing Mailboxes
         return $self->_process_cmd(
-            cmd => [ LIST => qq[$ref *] ],
-            final => sub { _unescape($_) for @list; @list },
+            cmd     => [ LIST => qq[$ref *] ],
+            final   => sub { map { _unescape($_) } @list },
             process => sub { push @list, $self->_process_list( $_[0] ); },
         );
 
     }
 
     return $self->_process_cmd(
-        cmd => [ LIST => qq[$ref $box] ],
-        final => sub { _unescape($_) for @list; @list },
+        cmd     => [ LIST => qq[$ref $box] ],
+        final   => sub { map { _unescape($_) } @list },
         process => sub { push @list, $self->_process_list( $_[0] ) },
     );
 }
@@ -707,16 +707,16 @@
         # recurse, should probably follow
         # RFC 2683: 3.2.2.  Subscriptions
         return $self->_process_cmd(
-            cmd => [ LSUB => qq[$ref *] ],
-            final => sub { _unescape($_) for @list; @list },
+            cmd     => [ LSUB => qq[$ref *] ],
+            final   => sub { map { _unescape($_) } @list },
             process => sub { push @list, $self->_process_list( $_[0] ) },
         );
 
     }
 
     return $self->_process_cmd(
-        cmd => [ LSUB => qq[$ref $box] ],
-        final => sub { _unescape($_) for @list; @list },
+        cmd     => [ LSUB => qq[$ref $box] ],
+        final   => sub { map { _unescape($_) } @list },
         process => sub { push @list, $self->_process_list( $_[0] ) },
     );
 }

Added: branches/upstream/libnet-imap-simple-perl/current/contrib/search-test.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/contrib/search-test.pl?rev=54303&op=file
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/contrib/search-test.pl (added)
+++ branches/upstream/libnet-imap-simple-perl/current/contrib/search-test.pl Sun Mar 14 15:56:33 2010
@@ -1,0 +1,41 @@
+#!/usr/bin/perl
+
+use strict;
+
+use Net::IMAP::Simple;
+my $goog = login();
+
+$goog->select("jet");
+
+my @id1 = $goog->search(q(SUBJECT "rt.cpan.org #55177"));                                                 print "id1: @id1\n";
+my @id2 = $goog->search(q(HEADER Message-ID "<rt-3.8.HEAD-12685-1267618808-430.55177-4-0 at rt.cpan.org>")); print "id2: @id2\n";
+
+$goog->put( jet => qq(from: jettero\@cpan.org\r\nMessage-ID: test-77\r\nsubject: test-77\r\n\r\ntest-77\r\n) );
+$goog->put( jet => qq(from: jettero\@cpan.org\r\nMessage-ID: <test-77>\r\nsubject: <test-77>\r\n\r\n<test-77>\r\n) );
+$goog->put( jet => qq(from: jettero\@cpan.org\r\nMessage-ID: <test-77\@hrm>\r\nsubject: <test-77\@hrm>\r\n\r\n<test-77\@hrm>\r\n) );
+
+my @id3 = $goog->search(q(HEADER Message-ID "test-77"));       print "id3: @id3\n";
+my @id4 = $goog->search(q(HEADER Message-ID "<test-77>"));     print "id4: @id4\n";
+my @id5 = $goog->search(q(HEADER Message-ID "<test-77 at hrm>")); print "id5: @id5\n";
+my @id6 = $goog->search(q(SUBJECT "test-77"));                 print "id6: @id6\n";
+
+
+# login {{{
+sub login {
+    my $arg = ""; $arg = ".$_[0]" if $_[0];
+    my $fetchmailrc; { open my $in, "$ENV{HOME}/.fetchmailrc$arg" or die $!; local $/ = undef; $fetchmailrc = <$in>; close $in; }
+    my $server = $1 if $fetchmailrc =~ m/server\s+(.+)/m;
+    my $user   = $1 if $fetchmailrc =~ m/user\s+(.+)/m;
+    my $pass   = $1 if $fetchmailrc =~ m/pass\s+(.+)/m;
+
+    print "$server ";
+    my $debug = 1;
+
+    my $imap = Net::IMAP::Simple->new($server, debug=>$debug, use_ssl=>1) or die "connect failed: $Net::IMAP::Simple::errstr";
+       $imap->login($user=>$pass) or die "login failed: " . $imap->errstr;
+
+    print "[in] ";
+
+    return $imap;
+}
+# }}}

Propchange: branches/upstream/libnet-imap-simple-perl/current/contrib/search-test.pl
------------------------------------------------------------------------------
    svn:executable = *

Added: branches/upstream/libnet-imap-simple-perl/current/t/11_mailboxes.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/t/11_mailboxes.t?rev=54303&op=file
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/t/11_mailboxes.t (added)
+++ branches/upstream/libnet-imap-simple-perl/current/t/11_mailboxes.t Sun Mar 14 15:56:33 2010
@@ -1,0 +1,26 @@
+use strict;
+use warnings;
+
+use Test;
+use Net::IMAP::Simple;
+
+plan tests => our $tests = 2;
+
+sub run_tests {
+    open INFC, ">>", "informal-imap-client-dump.log" or die $!;
+
+    my $imap = Net::IMAP::Simple->new('localhost:8000', debug=>\*INFC, use_ssl=>1)
+        or die "\nconnect failed: $Net::IMAP::Simple::errstr\n";
+
+    $imap->login(qw(working login));
+    my $nm = $imap->select('INBOX')
+        or die " failure selecting INBOX: " . $imap->errstr . "\n";
+
+    my @e = $imap->mailboxes;
+    my @E = qw(INBOX INBOX/working);
+
+    ok( $e[$_], $E[$_] ) for 0 .. $#e;
+}   
+
+do "t/test_server.pm" or die "error starting imap server: $!$@";
+

Modified: branches/upstream/libnet-imap-simple-perl/current/t/22_copy_multiple.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/t/22_copy_multiple.t?rev=54303&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/t/22_copy_multiple.t (original)
+++ branches/upstream/libnet-imap-simple-perl/current/t/22_copy_multiple.t Sun Mar 14 15:56:33 2010
@@ -19,11 +19,26 @@
     ok( $imap->select("INBOX")+0, 0 );
 
     $imap->put( INBOX => "Subject: test-$_\n\ntest-$_", '\Seen' ) for 1 .. 10;
-    ok( $imap->copy( "3:5,9",      'INBOX/working' ) );
-    ok( $imap->copy( "1,7",        'INBOX/working' ) );
-    #ok(!$imap->copy( "3:4,9,99,1", 'INBOX/working' ) );
-    skip(1,1,1);
-    ok( $imap->select("INBOX/working"), 6 );
+    ok( $imap->select("INBOX")+0, 10 );
+
+    my @res;
+    ok( $res[0] = $imap->copy( "3:5,9", 'INBOX/working' ) );
+    ok( $res[1] = $imap->copy( "1,7",   'INBOX/working' ) );
+    ok( $res[2] = $imap->select("INBOX/working"), 6 );
+
+    if( $ENV{AUTOMATED_TESTING} ) {
+        unless( $res[0] and $res[1] and $res[2] ) {
+            warn "\n\n multi-copy test restuls have been vexing module maintainer, logdump follows( @res )\n";
+            sleep 1;
+
+            for my $file(qw(informal-imap-client-dump.log informal-imap-server-dump.log)) {
+                if( open my $in, $file ) {
+                    print STDERR "dumping $file\n";
+                    print STDERR $_ while <$in>;
+                }
+            }
+        }
+    }
 }   
 
 do "t/test_server.pm" or die "error starting imap server: $!$@";

Added: branches/upstream/libnet-imap-simple-perl/current/t/23_delete_multiple.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/t/23_delete_multiple.t?rev=54303&op=file
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/t/23_delete_multiple.t (added)
+++ branches/upstream/libnet-imap-simple-perl/current/t/23_delete_multiple.t Sun Mar 14 15:56:33 2010
@@ -1,0 +1,41 @@
+use strict;
+use warnings;
+
+use Test;
+use Net::IMAP::Simple;
+
+plan tests => our $tests = 8;
+
+sub run_tests {
+    open INFC, ">>", "informal-imap-client-dump.log" or die $!;
+
+    my $imap = Net::IMAP::Simple->new('localhost:8000', debug=>\*INFC, use_ssl=>1)
+        or die "\nconnect failed: $Net::IMAP::Simple::errstr\n";
+
+    $imap->login(qw(working login));
+    my $nm = $imap->select('INBOX')
+        or die " failure selecting INBOX: " . $imap->errstr . "\n";
+
+    ok( $imap->select("INBOX")+0, 0 );
+
+    $imap->put( INBOX => "Subject: test-$_\n\ntest-$_", '\Seen' ) for 1 .. 10;
+    $imap->delete( "3:4,6" ) or die $imap->errstr;
+    my @e = $imap->expunge_mailbox;
+    ok( not $imap->waserr );
+    ok( "@e", "3 3 4" );
+     
+    $imap->delete( "3,4" ) or die $imap->errstr;
+    my $e = $imap->expunge_mailbox;
+    ok( not $imap->waserr );
+    ok( $e, "2" );
+
+    $imap->delete( "4:7,9,10" ) or die $imap->errstr;
+    @e = $imap->expunge_mailbox;
+    ok( not $imap->waserr );
+    ok( "@e", "4 4" );
+
+    ok( $imap->last, 3 );
+}   
+
+do "t/test_server.pm" or die "error starting imap server: $!$@";
+

Modified: branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm?rev=54303&op=diff
==============================================================================
--- branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm (original)
+++ branches/upstream/libnet-imap-simple-perl/current/t/test_server.pm Sun Mar 14 15:56:33 2010
@@ -72,7 +72,7 @@
     $line =~ s/(\* OK).*/$1 $file ($ver)/;
 
     my $len = length $line; $len ++;
-    print STDERR "\e7\e[5000C\e[${len}D$line\e8";
+    print STDERR "\e7\e[5000C\e[${len}D$line\e8" unless $ENV{AUTOMATED_TESTING};
     close $imapfh;
 
     $0 = "Net::IMAP::Simple($$)";




More information about the Pkg-perl-cvs-commits mailing list