r8441 - in /branches/upstream/libemail-send-perl/current: Changes META.yml lib/Email/Send.pm t/classic.t t/test.t
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Mon Oct 22 06:49:23 UTC 2007
Author: dmn
Date: Mon Oct 22 06:49:23 2007
New Revision: 8441
URL: http://svn.debian.org/wsvn/?sc=1&rev=8441
Log:
[svn-upgrade] Integrating new upstream version, libemail-send-perl (2.191)
Modified:
branches/upstream/libemail-send-perl/current/Changes
branches/upstream/libemail-send-perl/current/META.yml
branches/upstream/libemail-send-perl/current/lib/Email/Send.pm
branches/upstream/libemail-send-perl/current/t/classic.t
branches/upstream/libemail-send-perl/current/t/test.t
Modified: branches/upstream/libemail-send-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-send-perl/current/Changes?rev=8441&op=diff
==============================================================================
--- branches/upstream/libemail-send-perl/current/Changes (original)
+++ branches/upstream/libemail-send-perl/current/Changes Mon Oct 22 06:49:23 2007
@@ -1,3 +1,7 @@
+2.191 2007-10-21
+ use Test mailer, not IO::All, to test internal interfaces
+ (thanks, Andreas)
+
2.190 2007-09-18
fix bugs exposed by new Test::More
Modified: branches/upstream/libemail-send-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-send-perl/current/META.yml?rev=8441&op=diff
==============================================================================
--- branches/upstream/libemail-send-perl/current/META.yml (original)
+++ branches/upstream/libemail-send-perl/current/META.yml Mon Oct 22 06:49:23 2007
@@ -1,9 +1,9 @@
--- #YAML:1.0
name: Email-Send
-version: 2.190
+version: 2.191
abstract: Simply Sending Email
license: perl
-generated_by: ExtUtils::MakeMaker version 6.32
+generated_by: ExtUtils::MakeMaker version 6.36_01
distribution_type: module
requires:
Email::Address: 1.80
Modified: branches/upstream/libemail-send-perl/current/lib/Email/Send.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-send-perl/current/lib/Email/Send.pm?rev=8441&op=diff
==============================================================================
--- branches/upstream/libemail-send-perl/current/lib/Email/Send.pm (original)
+++ branches/upstream/libemail-send-perl/current/lib/Email/Send.pm Mon Oct 22 06:49:23 2007
@@ -2,7 +2,7 @@
use strict;
use vars qw[$VERSION];
-$VERSION = '2.190';
+$VERSION = '2.191';
use Email::Simple;
use Module::Pluggable search_path => 'Email::Send';
Modified: branches/upstream/libemail-send-perl/current/t/classic.t
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-send-perl/current/t/classic.t?rev=8441&op=diff
==============================================================================
--- branches/upstream/libemail-send-perl/current/t/classic.t (original)
+++ branches/upstream/libemail-send-perl/current/t/classic.t Mon Oct 22 06:49:23 2007
@@ -1,62 +1,28 @@
-use Test::More;
+use Test::More tests => 2;
use strict;
$^W =1;
-BEGIN {
- if ($^O eq 'MSWin32') {
- plan skip_all => "Patches welcome to better test Win32";
- } else {
- plan tests => 3;
- }
-}
-
-BEGIN { use_ok 'Email::Send'; }
-
+use Email::Send;
use Email::Simple;
-SKIP: {
- skip "IO::All required for these tests", 2 unless eval "use IO::All; 1";
- {
- my $message = Email::Simple->new(<<'__MESSAGE__');
+{
+ my $message = Email::Simple->new(<<'__MESSAGE__');
To: me at myhost.com
From: you at yourhost.com
Subject: Test
-
+
Testing this thing out.
__MESSAGE__
- unlink 'testfile'; # just in case
-
- send('IO', $message, 'testfile');
-
- my $test = do { local $/; open T, 'testfile' or die $!; <T> };
-
- my $test_message = Email::Simple->new($test);
-
- is $test_message->as_string, $message->as_string, 'sent properly';
+ send('Test', $message, 1, 2, 3);
- unlink 'testfile';
- }
+ my ($deliveries) = Email::Send::Test->deliveries;
+ my $test_message = $deliveries->[1];
+ is_deeply(
+ $deliveries->[2],
+ [ 1, 2, 3 ],
+ "args passed in properly",
+ );
- {
- my $message = Email::Simple->new(<<'__MESSAGE__');
-To: me at myhost.com
-From: you at yourhost.com
-Subject: Test
-
-Testing this thing out.
-__MESSAGE__
-
- my $message_text = $message->as_string;
-
- send('IO', $message_text, 'testfile');
-
- my $test = do { local $/; open T, 'testfile'; <T> };
-
- my $test_message = Email::Simple->new($test);
-
- is $test_message->as_string, $message->as_string, 'sent properly';
-
- unlink 'testfile';
- }
+ is $test_message->as_string, $message->as_string, 'sent properly';
}
Modified: branches/upstream/libemail-send-perl/current/t/test.t
URL: http://svn.debian.org/wsvn/branches/upstream/libemail-send-perl/current/t/test.t?rev=8441&op=diff
==============================================================================
--- branches/upstream/libemail-send-perl/current/t/test.t (original)
+++ branches/upstream/libemail-send-perl/current/t/test.t Mon Oct 22 06:49:23 2007
@@ -1,62 +1,30 @@
-use Test::More tests => 3;
+use Test::More tests => 2;
use strict;
$^W = 1;
-BEGIN {
- use_ok 'Email::Send';
-}
-
+use Email::Send;
use Email::Simple;
-SKIP: {
- skip "IO::All required for these tests", 2 unless eval "use IO::All; 1;";
- {
- my $message = Email::Simple->new(<<'__MESSAGE__');
+{
+ my $message = Email::Simple->new(<<'__MESSAGE__');
To: me at myhost.com
From: you at yourhost.com
Subject: Test
-
+
Testing this thing out.
__MESSAGE__
- unlink 'testfile'; # just in case
- Email::Send->new({mailer => 'IO', mailer_args => ['testfile']})
- ->send($message);
+ Email::Send->new({mailer => 'Test', mailer_args => [ 1, 2, 3 ]})
+ ->send($message);
- my $test = do {
- local $/;
- open T, 'testfile' or die "couldn't open testfile: $!";
- <T>
- };
- close T;
+ my ($deliveries) = Email::Send::Test->deliveries;
+ my $test_message = $deliveries->[1];
+ is_deeply(
+ $deliveries->[2],
+ [ 1, 2, 3 ],
+ "args passed in properly",
+ );
- my $test_message = Email::Simple->new($test);
+ is $test_message->as_string, $message->as_string, 'sent properly';
- is $test_message->as_string, $message->as_string, 'sent properly';
-
- unlink 'testfile';
- }
- {
- my $message = Email::Simple->new(<<'__MESSAGE__');
-To: me at myhost.com
-From: you at yourhost.com
-Subject: Test
-
-Testing this thing out.
-__MESSAGE__
-
- my $message_text = $message->as_string;
-
- Email::Send->new({mailer => 'IO', mailer_args => ['testfile']})
- ->send($message_text);
-
- my $test = do { local $/; open T, 'testfile'; <T> };
- close T;
-
- my $test_message = Email::Simple->new($test);
-
- is $test_message->as_string, $message->as_string, 'sent properly';
-
- unlink 'testfile';
- }
}
More information about the Pkg-perl-cvs-commits
mailing list