r8791 - in /trunk/libmime-types-perl/debian/patches: ./ series tests.patch
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Sat Nov 3 15:17:57 UTC 2007
Author: gregoa-guest
Date: Sat Nov 3 15:17:57 2007
New Revision: 8791
URL: http://svn.debian.org/wsvn/?sc=1&rev=8791
Log:
prepare patch to make tests work in 'normal' environment, not applied yet.
Added:
trunk/libmime-types-perl/debian/patches/
trunk/libmime-types-perl/debian/patches/series
trunk/libmime-types-perl/debian/patches/tests.patch
Added: trunk/libmime-types-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/trunk/libmime-types-perl/debian/patches/series?rev=8791&op=file
==============================================================================
--- trunk/libmime-types-perl/debian/patches/series (added)
+++ trunk/libmime-types-perl/debian/patches/series Sat Nov 3 15:17:57 2007
@@ -1,0 +1,1 @@
+tests.patch
Added: trunk/libmime-types-perl/debian/patches/tests.patch
URL: http://svn.debian.org/wsvn/trunk/libmime-types-perl/debian/patches/tests.patch?rev=8791&op=file
==============================================================================
--- trunk/libmime-types-perl/debian/patches/tests.patch (added)
+++ trunk/libmime-types-perl/debian/patches/tests.patch Sat Nov 3 15:17:57 2007
@@ -1,0 +1,77 @@
+Index: libmime-types-perl/t/30export.t
+===================================================================
+--- libmime-types-perl.orig/t/30export.t 2007-11-03 16:09:59.000000000 +0100
++++ libmime-types-perl/t/30export.t 2007-11-03 16:12:25.000000000 +0100
+@@ -30,14 +30,14 @@
+ is($cte, "");
+
+ my @c = MIME::Types::by_mediatype("oGG");
+-cmp_ok(scalar @c, '==', 1);
++cmp_ok(scalar @c, '>', 0);
+ cmp_ok(scalar @{$c[0]}, '>', 2);
+ is($c[0]->[0], "ogg");
+ is($c[0]->[1], "application/ogg");
+ is($c[0]->[2], "base64");
+
+ @c = MIME::Types::by_mediatype("Application/pDF");
+-cmp_ok(scalar @c, '<', 2);
++cmp_ok(scalar @c, '>=', 1);
+ cmp_ok(scalar @{$c[0]}, '==', 3);
+ is($c[0]->[0], "pdf");
+ is($c[0]->[1], "application/pdf");
+@@ -66,13 +66,13 @@
+ is($aref->[1], "");
+
+ $aref = MIME::Types::by_mediatype("ogg");
+-cmp_ok(scalar @$aref, '==', 1);
++cmp_ok(scalar @$aref, '>', 0);
+ is($aref->[0]->[0], "ogg");
+ is($aref->[0]->[1], "application/ogg");
+ is($aref->[0]->[2], "base64");
+
+ $aref = MIME::Types::by_mediatype("Application/pDF");
+-cmp_ok(scalar @$aref, '==', 1);
++cmp_ok(scalar @$aref, '>', 0);
+ is($aref->[0]->[0], "pdf");
+ is($aref->[0]->[1], "application/pdf");
+ is($aref->[0]->[2], "base64");
+Index: libmime-types-perl/t/20types.t
+===================================================================
+--- libmime-types-perl.orig/t/20types.t 2007-11-03 16:09:59.000000000 +0100
++++ libmime-types-perl/t/20types.t 2007-11-03 16:12:25.000000000 +0100
+@@ -16,20 +16,20 @@
+ ok(defined $a);
+
+ my @t = $a->type('multipart/mixed');
+-cmp_ok(scalar @t, '==', 1);
++cmp_ok(scalar @t, '>', 0);
+ my $t = $t[0];
+ isa_ok($t, 'MIME::Type');
+ is($t->type, 'multipart/mixed');
+
+ # No extensions, but a known, explicit encoding.
+ @t = $a->type('message/rfc822');
+-cmp_ok(scalar @t, '==', 1);
++cmp_ok(scalar @t, '>', 0);
+ $t = $t[0];
+ ok(not $t->extensions);
+ is($t->encoding, '8bit');
+
+ @t = $a->type('TEXT/x-RTF');
+-cmp_ok(scalar @t, '==', 1);
++cmp_ok(scalar @t, '>', 0);
+ $t = $t[0];
+ is($t->type, 'text/rtf');
+
+@@ -52,9 +52,9 @@
+ is($q->type, 'text/plain');
+ }
+ else
+-{ is($q->type, 'application/x-msword');
++{ like($q->type, qr;application/(x-)?msword;);
+ }
+-is($a->mimeTypeOf('my.lzh')->type, 'application/octet-stream');
++like($a->mimeTypeOf('my.lzh')->type, qr;application/(octet-stream|x-lzh););
+
+ my $warn;
+ my $r2 = MIME::Type->new(type => 'text/x-fake2');
More information about the Pkg-perl-cvs-commits
mailing list