r3274 - in /packages/libemail-simple-perl/branches/upstream/current: Changes MANIFEST META.yml Simple.pm t/badly-folded.t t/no-body.t t/pod-coverage.t t/pod.t t/test-mails/badly-folded t/test-mails/josey-nobody

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Fri Jul 14 20:06:10 UTC 2006


Author: gregoa-guest
Date: Fri Jul 14 20:06:09 2006
New Revision: 3274

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3274
Log:
Load /tmp/tmp.ksvQv31863/libemail-simple-perl-1.94 into
packages/libemail-simple-perl/branches/upstream/current.

Added:
    packages/libemail-simple-perl/branches/upstream/current/t/badly-folded.t
    packages/libemail-simple-perl/branches/upstream/current/t/no-body.t
    packages/libemail-simple-perl/branches/upstream/current/t/pod-coverage.t
    packages/libemail-simple-perl/branches/upstream/current/t/pod.t
    packages/libemail-simple-perl/branches/upstream/current/t/test-mails/badly-folded
    packages/libemail-simple-perl/branches/upstream/current/t/test-mails/josey-nobody
Modified:
    packages/libemail-simple-perl/branches/upstream/current/Changes
    packages/libemail-simple-perl/branches/upstream/current/MANIFEST
    packages/libemail-simple-perl/branches/upstream/current/META.yml
    packages/libemail-simple-perl/branches/upstream/current/Simple.pm

Modified: packages/libemail-simple-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/Changes?rev=3274&op=diff
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/Changes (original)
+++ packages/libemail-simple-perl/branches/upstream/current/Changes Fri Jul 14 20:06:09 2006
@@ -1,4 +1,9 @@
 Revision history for Perl extension Email::Simple.
+
+1.94    2006-07-03
+
+  - Fix folding of long headers with \r as line ending (thanks Adam Worrall)
+  - add tests for message with no body
 
 1.92    2004-11-11
 

Modified: packages/libemail-simple-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/MANIFEST?rev=3274&op=diff
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/MANIFEST (original)
+++ packages/libemail-simple-perl/branches/upstream/current/MANIFEST Fri Jul 14 20:06:09 2006
@@ -7,7 +7,13 @@
 t/2.t
 t/3.t
 t/4.t
+t/badly-folded.t
+t/no-body.t
+t/pod.t
+t/pod-coverage.t
+t/test-mails/badly-folded
 t/test-mails/josey-fold
+t/test-mails/josey-nobody
 t/test-mails/josey-nofold
 t/test-mails/long-msgid
 t/unit.t

Modified: packages/libemail-simple-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/META.yml?rev=3274&op=diff
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/META.yml (original)
+++ packages/libemail-simple-perl/branches/upstream/current/META.yml Fri Jul 14 20:06:09 2006
@@ -1,11 +1,11 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Email-Simple
-version:      1.92
+version:      1.94
 version_from: Simple.pm
 installdirs:  site
 requires:
     Test::More:                    0.47
 
 distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+generated_by: ExtUtils::MakeMaker version 6.30

Modified: packages/libemail-simple-perl/branches/upstream/current/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/Simple.pm?rev=3274&op=diff
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/Simple.pm (original)
+++ packages/libemail-simple-perl/branches/upstream/current/Simple.pm Fri Jul 14 20:06:09 2006
@@ -5,7 +5,7 @@
 use Carp;
 
 use vars qw($VERSION $GROUCHY);
-$VERSION = '1.92';
+$VERSION = '1.94';
 
 my $crlf = qr/\x0a\x0d|\x0d\x0a|\x0a|\x0d/; # We are liberal in what we accept.
                                             # But then, so is a six dollar whore.
@@ -218,8 +218,8 @@
     my @stuff = @$data;
     # Ignore "empty" headers
     return '' unless @stuff = grep { defined $_ } @stuff;
-    return join "", map { $_ = "$field: $_$self->{mycrlf}";
-                          length > 78 ? $self->_fold($_) : $_ }
+    return join "", map { length > 78 ? $self->_fold($_) : "$_$self->{mycrlf}" }
+                    map { "$field: $_" } 
                     @stuff;
 }
 

Added: packages/libemail-simple-perl/branches/upstream/current/t/badly-folded.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/t/badly-folded.t?rev=3274&op=file
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/t/badly-folded.t (added)
+++ packages/libemail-simple-perl/branches/upstream/current/t/badly-folded.t Fri Jul 14 20:06:09 2006
@@ -1,0 +1,19 @@
+#!perl -w
+use strict;
+use Test::More tests => 2;
+
+# This time, with folding!
+
+use_ok("Email::Simple");
+sub read_file { local $/; local *FH; open FH, shift or die $!; return <FH> }
+
+my $mail_text = read_file("t/test-mails/badly-folded");
+
+my $msg1 = Email::Simple->new($mail_text);
+my $msg2 = Email::Simple->new($msg1->as_string);
+
+is(
+  $msg2->header('X-Sieve'),
+  'CMU Sieve 2.2',
+  "still have X-Sieve header after round trip",
+);

Added: packages/libemail-simple-perl/branches/upstream/current/t/no-body.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/t/no-body.t?rev=3274&op=file
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/t/no-body.t (added)
+++ packages/libemail-simple-perl/branches/upstream/current/t/no-body.t Fri Jul 14 20:06:09 2006
@@ -1,0 +1,25 @@
+#!perl -w
+use strict;
+use Test::More tests => 4;
+
+# This time, with folding!
+
+use_ok("Email::Simple");
+sub read_file { local $/; local *FH; open FH, shift or die $!; return <FH> }
+
+my $mail_text = read_file("t/test-mails/josey-nobody");
+
+my $mail = Email::Simple->new($mail_text);
+isa_ok($mail, "Email::Simple");
+
+is(
+  $mail->header('From'),
+  'Andrew Josey <ajosey at rdg.opengroup.org>',
+  'correct From header on bodyless message',
+);
+
+SKIP: {
+    skip "no alarm() on win32", 1 if $^O =~ /mswin32/i;
+    alarm 5;
+    ok($mail->as_string(), "doesn't hang");
+};

Added: packages/libemail-simple-perl/branches/upstream/current/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/t/pod-coverage.t?rev=3274&op=file
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/t/pod-coverage.t (added)
+++ packages/libemail-simple-perl/branches/upstream/current/t/pod-coverage.t Fri Jul 14 20:06:09 2006
@@ -1,0 +1,10 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.08";
+plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
+  if $@;
+
+all_pod_coverage_ok({
+  coverage_class => 'Pod::Coverage::CountParents'
+});

Added: packages/libemail-simple-perl/branches/upstream/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/t/pod.t?rev=3274&op=file
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/t/pod.t (added)
+++ packages/libemail-simple-perl/branches/upstream/current/t/pod.t Fri Jul 14 20:06:09 2006
@@ -1,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();

Added: packages/libemail-simple-perl/branches/upstream/current/t/test-mails/badly-folded
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/t/test-mails/badly-folded?rev=3274&op=file
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/t/test-mails/badly-folded (added)
+++ packages/libemail-simple-perl/branches/upstream/current/t/test-mails/badly-folded Fri Jul 14 20:06:09 2006
@@ -1,0 +1,48 @@
+Return-Path: <sundar at foo.com>
+Received: from murder ([unix socket])
+	 (authenticated user=adam bits=0)
+	 by mail1.foo.com (Cyrus v2.2.12-OS X 10.4.0) with LMTPA;
+	 Tue, 25 Oct 2005 07:26:59 -0400
+X-Sieve: CMU Sieve 2.2
+X-Original-To: adam at mail1.internal.foo.com
+Delivered-To: adam at mail1.internal.foo.com
+Received: from localhost (localhost [127.0.0.1])
+	by mail1.foo.com (Postfix) with ESMTP id C24ABADEA15
+	for <adam at mail1.internal.foo.com>; Tue, 25 Oct 2005 07:26:58 -0400 (EDT)
+Received: from mail1.foo.com ([127.0.0.1])
+ by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
+ id 20330-05 for <adam at mail1.internal.foo.com>;
+ Tue, 25 Oct 2005 07:26:55 -0400 (EDT)
+Received: from mta.internal.foo.com (mta.internal.foo.com [0.0.0.0])
+	by mail1.foo.com (Postfix) with ESMTP id 1D919ADE9FE
+	for <adam at mail1.internal.foo.com>; Tue, 25 Oct 2005 07:26:55 -0400 (EDT)
+Received: from [0.0.0.0] ([0.0.0.0])
+	(authenticated bits=0)
+	by mta.internal.foo.com (8.12.8/8.12.8) with ESMTP id j9PBQoCT026374
+	(version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO)
+	for <adam at foo.com>; Tue, 25 Oct 2005 07:26:53 -0400
+Message-ID: <blah at foo.com>
+Date: Tue, 25 Oct 2005 07:30:17 -0400
+From: x <x at foo.com>
+Reply-To: x at foo.com
+User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
+X-Accept-Language: en-us, en
+MIME-Version: 1.0
+To: Adam Worrall <adam at foo.com>
+Subject: My subject
+X-Enigmail-Version: 0.91.0.0
+Content-Type: multipart/mixed;
+ boundary="------------040701020305070002070307"
+X-PMX-Version: 4.6.1.107272
+X-Virus-Scanned: by amavisd-new at foo.com
+
+This is a multi-part message in MIME format.
+--------------040701020305070002070307
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 7bit
+
+Blah blah
+
+--------------040701020305070002070307--
+
+

Added: packages/libemail-simple-perl/branches/upstream/current/t/test-mails/josey-nobody
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libemail-simple-perl/branches/upstream/current/t/test-mails/josey-nobody?rev=3274&op=file
==============================================================================
--- packages/libemail-simple-perl/branches/upstream/current/t/test-mails/josey-nobody (added)
+++ packages/libemail-simple-perl/branches/upstream/current/t/test-mails/josey-nobody Fri Jul 14 20:06:09 2006
@@ -1,0 +1,18 @@
+Received: (qmail 1679 invoked by uid 503); 13 Nov 2002 10:10:49 -0000
+Resent-Date: 13 Nov 2002 10:10:49 -0000
+Date: Wed, 13 Nov 2002 10:06:51 GMT
+From: Andrew Josey <ajosey at rdg.opengroup.org>
+Message-Id: <1021113100650.ZM12997 at skye.rdg.opengroup.org>
+In-Reply-To: Joanna Farley's message as of Nov 13,  9:56am.
+X-Mailer: Z-Mail (5.0.0 30July97)
+To: austin-group-l at opengroup.org
+Subject: Re: Defect in XBD lround
+MIME-Version: 1.0
+Resent-Message-ID: <gZGK1B.A.uY.iUi09 at mailman>
+Resent-To: austin-group-l at opengroup.org
+Resent-From: austin-group-l at opengroup.org
+X-Mailing-List: austin-group-l:archive/latest/4823
+X-Loop: austin-group-l at opengroup.org
+Precedence: list
+Resent-Sender: austin-group-l-request at opengroup.org
+Content-Type: text/plain; charset=us-ascii




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