r9574 - in /trunk/mime-tools: debian/changelog t/ExtUtils/ t/Gauntlet.t t/ParserEncoded.t t/Tmpfile.topt
hanska-guest at users.alioth.debian.org
hanska-guest at users.alioth.debian.org
Sun Nov 18 15:08:46 UTC 2007
Author: hanska-guest
Date: Sun Nov 18 15:08:46 2007
New Revision: 9574
URL: http://svn.debian.org/wsvn/?sc=1&rev=9574
Log:
* (NOT RELEASED YET) New upstream release
Removed:
trunk/mime-tools/t/ExtUtils/
trunk/mime-tools/t/Tmpfile.topt
Modified:
trunk/mime-tools/debian/changelog
trunk/mime-tools/t/Gauntlet.t
trunk/mime-tools/t/ParserEncoded.t
Modified: trunk/mime-tools/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/mime-tools/debian/changelog?rev=9574&op=diff
==============================================================================
--- trunk/mime-tools/debian/changelog (original)
+++ trunk/mime-tools/debian/changelog Sun Nov 18 15:08:46 2007
@@ -1,3 +1,9 @@
+mime-tools (5.425-1) UNRELEASED; urgency=low
+
+ * (NOT RELEASED YET) New upstream release
+
+ -- David Paleino <d.paleino at gmail.com> Sun, 18 Nov 2007 16:07:07 +0100
+
mime-tools (5.420-3) UNRELEASED; urgency=low
[ gregor herrmann ]
Modified: trunk/mime-tools/t/Gauntlet.t
URL: http://svn.debian.org/wsvn/trunk/mime-tools/t/Gauntlet.t?rev=9574&op=diff
==============================================================================
--- trunk/mime-tools/t/Gauntlet.t (original)
+++ trunk/mime-tools/t/Gauntlet.t Sun Nov 18 15:08:46 2007
@@ -1,10 +1,8 @@
-use lib "./t";
-
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use Test::More tests => 63;
use MIME::Parser;
-
-use strict;
-config MIME::Tools DEBUGGING=>0;
-use ExtUtils::TBone;
# Are on a machine where binmode matters?
@@ -18,9 +16,6 @@
my $MSGLEN = 669;
my $MSGLINES = 20;
my $MSGLEN_text = $MSGLEN + ($uses_crlf * $MSGLINES);
-
-# Checker:
-my $T = typical ExtUtils::TBone;
# Gout...
sub gout {
@@ -36,42 +31,40 @@
$pos1 = tell($sh);
eval { $ent->print($h) };
$pos2 = tell($sh);
- $T->ok((!$@ and (($pos2 - $pos1) == $MSGLEN_text)),
+ ok((!$@ and (($pos2 - $pos1) == $MSGLEN_text)),
"$h, $test [$pos1-$pos2 == $MSGLEN_text]");
print $sh "\n", "=" x 30, " ", ($test = "print ent->as_string"), "\n";
$pos1 = tell($sh);
eval { print $h $ent->as_string };
$pos2 = tell($sh);
- $T->ok((!$@ and (($pos2 - $pos1) == $MSGLEN_text)),
+ ok((!$@ and (($pos2 - $pos1) == $MSGLEN_text)),
"$h, $test [$pos1-$pos2]");
print $sh "\n", "=" x 30, " ", ($test = "ent->print_header"), "\n";
eval { $ent->print_header($h) };
- $T->ok(!$@, "$h, $test: $@");
+ ok(!$@, "$h, $test: $@");
print $sh "\n", "=" x 30, " ", ($test = "ent->print_body"), "\n";
eval { $ent->print_body($h) };
- $T->ok(!$@, "$h, $test: $@");
+ ok(!$@, "$h, $test: $@");
print $sh "\n", "=" x 30, " ", ($test = "ent->bodyhandle->print"), "\n";
eval { $ent->bodyhandle->print($h) };
- $T->ok(!$@, "$h, $test: $@");
+ ok(!$@, "$h, $test: $@");
print $sh "\n", "=" x 30, " ",($test = "print ent->bodyhandle->data"),"\n";
eval { print $h $ent->bodyhandle->data };
- $T->ok(!$@, "$h, $test: $@");
+ ok(!$@, "$h, $test: $@");
1;
}
# Loops:
+# When adjusting these, make sure to increment test count. Should be:
+# 21 * scalar @corelims * scalar @msgfiles
my @msgfiles = qw(simple.msg);
my @corelims = qw(ALL NONE 512);
-
-
-# Create checker:
-$T->begin(((6+1) * 3 * int(@corelims) * int(@msgfiles)));
# Create a parser:
my $parser = new MIME::Parser;
@@ -97,26 +90,22 @@
gout('::GOUT', $ent);
close GOUT;
my $s1 = -s $out;
- $T->ok($s1 == $outsize, "BARE FH: size $out ($s1) == $outsize?");
+ is($s1, $outsize, "BARE FH: size $out ($s1) == $outsize?");
# Open output stream 2:
open GOUT, ">$out" or die "$!";
gout(\*GOUT, $ent);
close GOUT;
my $s2 = -s $out;
- $T->ok($s2 == $outsize, "GLOB ref: size $out ($s2) == $outsize?");
+ is($s2, $outsize, "GLOB ref: size $out ($s2) == $outsize?");
# Open output stream 3:
- my $GOUT = (new FileHandle ">$out") || die "$!";
+ my $GOUT = IO::File->new($out, '>') || die "$!";
gout($GOUT, $ent);
$GOUT->close;
my $s3 = -s $out;
- $T->ok($s3 == $outsize, "FileHandle: size $out ($s3) == $outsize?");
+ is($s3, $outsize, "IO::File: size $out ($s3) == $outsize?");
}
}
-
-# Done!
-exit(0);
1;
-
Modified: trunk/mime-tools/t/ParserEncoded.t
URL: http://svn.debian.org/wsvn/trunk/mime-tools/t/ParserEncoded.t?rev=9574&op=diff
==============================================================================
--- trunk/mime-tools/t/ParserEncoded.t (original)
+++ trunk/mime-tools/t/ParserEncoded.t Sun Nov 18 15:08:46 2007
@@ -1,6 +1,7 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
use strict;
+use warnings;
use Test::More;
plan tests => 5;
More information about the Pkg-perl-cvs-commits
mailing list