summaryrefslogtreecommitdiff
path: root/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch')
-rw-r--r--dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch96
1 files changed, 96 insertions, 0 deletions
diff --git a/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch b/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch
new file mode 100644
index 00000000000..a9e1bdb0b02
--- /dev/null
+++ b/dev-perl/MIME-Lite-HTML/files/MIME-Lite-HTML-1.240.0-tests1.patch
@@ -0,0 +1,96 @@
+From 0a67f501c8af5585af7fec08cbe0964b1a235b93 Mon Sep 17 00:00:00 2001
+From: Peter Mottram <peter@sysnix.com>
+Date: Thu, 12 May 2016 16:48:38 +0200
+Subject: [PATCH] force header ordering in tests and ignore blank lines in
+ diffs
+
+This fixes effects of hash randomisation and line-break changes in
+MIME::Lite.
+---
+ t/20create_image_part.t | 7 +++++++
+ t/50generic.t | 20 +++++++++++++-------
+ 2 files changed, 20 insertions(+), 7 deletions(-)
+
+diff --git a/t/20create_image_part.t b/t/20create_image_part.t
+index 0df935f..4de4440 100644
+--- a/t/20create_image_part.t
++++ b/t/20create_image_part.t
+@@ -8,6 +8,13 @@ use Cwd;
+
+ # For create ref file, use perl -Iblib/lib t/20create_image_part.t 1
+
++MIME::Lite->field_order(
++ 'mime-version', 'content-id',
++ 'content-location', 'content-transfer-encoding',
++ 'content-type', 'subject',
++ 'to', 'from'
++);
++
+ my $t = "/var/tmp/mime-lite-html-tests";
+ my $p = cwd;
+ my $o = (system("ln -s $p/t $t")==0);
+diff --git a/t/50generic.t b/t/50generic.t
+index 5ba7895..76b879d 100644
+--- a/t/50generic.t
++++ b/t/50generic.t
+@@ -10,6 +10,12 @@ use Cwd;
+ URI::URL->strict(1);
+ }
+
++MIME::Lite->field_order(
++ 'mime-version', 'content-id',
++ 'content-location', 'content-transfer-encoding',
++ 'content-type', 'subject',
++ 'to', 'from'
++);
+
+ # For create ref file, use perl -Iblib/lib t/50generic.t 1
+
+@@ -47,11 +53,11 @@ foreach my $it ('cid', 'location', 'extern') {
+ or die "Can't create $f.created_by_test:$!";
+ print PROD $rep;
+ close(PROD);
+- my $r = `diff $ref $f.created_by_test`;
++ my $r = `diff -B $ref $f.created_by_test`;
+ cmp_ok($mailHTML->size, ">", (stat($ref))[7], "Same size");
+ cmp_ok($mailHTML->size*0.945, "<", (stat($ref))[7], "Same size");
+ is($r, "", $ref);
+- unlink("$f.created_by_test");
++ #unlink("$f.created_by_test");
+ }
+ # for create ref file
+ elsif ($ARGV[0]) {
+@@ -88,11 +94,11 @@ foreach my $it ('cid', 'location', 'extern') {
+ or die "Can't create $f.created_by_test:$!";
+ print PROD $rep;
+ close(PROD);
+- my $r = `diff $ref $f.created_by_test`;
++ my $r = `diff -B $ref $f.created_by_test`;
+ cmp_ok($mailHTML->size, ">", (stat($ref))[7], "Same size");
+ cmp_ok($mailHTML->size*0.945, "<", (stat($ref))[7], "Same size");
+ is($r, "", $ref);
+- unlink("$f.created_by_test");
++ #unlink("$f.created_by_test");
+ }
+ # for create ref file
+ elsif ($ARGV[0]) {
+@@ -130,11 +136,11 @@ foreach my $it ('cid', 'location', 'extern') {
+ or die "Can't create $f.created_by_test:$!";
+ print PROD $rep;
+ close(PROD);
+- my $r = `diff $ref $f.created_by_test`;
++ my $r = `diff -B $ref $f.created_by_test`;
+ cmp_ok($mailHTML->size, ">", (stat($ref))[7], "Same size");
+ cmp_ok($mailHTML->size*0.945, "<", (stat($ref))[7], "Same size");
+ is($r, "", $ref);
+- unlink("$f.created_by_test");
++ #unlink("$f.created_by_test");
+ }
+ # for create ref file
+ elsif ($ARGV[0]) {
+@@ -156,4 +162,4 @@ my $mailHTML = new MIME::Lite::HTML
+ my %vars = ( 'perl' => 'fast', 'lng' => 'Ruby');
+ cmp_ok($mailHTML->fill_template('Perl is <? $perl ?>, <? $lng ?> suck',\%vars),
+ 'eq', 'Perl is fast, Ruby suck',"Call of fill_template do his job");
+-unlink($t);
++#unlink($t);