commit 4926b8e6fefab15a1c668c7a84b699787d299ecc Author: Petr Písař <ppisar@xxxxxxxxxx> Date: Fri Apr 18 14:39:26 2014 +0200 Fix test to expect random hash keys ...rturbed-structure-members-on-t-11writer.t.patch | 85 ++++++++++++++++++++ perl-BZ-Client.spec | 8 ++- 2 files changed, 92 insertions(+), 1 deletions(-) --- diff --git a/BZ-Client-1.04-Expect-perturbed-structure-members-on-t-11writer.t.patch b/BZ-Client-1.04-Expect-perturbed-structure-members-on-t-11writer.t.patch new file mode 100644 index 0000000..d50bd29 --- /dev/null +++ b/BZ-Client-1.04-Expect-perturbed-structure-members-on-t-11writer.t.patch @@ -0,0 +1,85 @@ +From e3f477126292acf944b39b755e6212ed3ffc3212 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@xxxxxxxxxx> +Date: Fri, 18 Apr 2014 14:31:32 +0200 +Subject: [PATCH] Expect perturbed structure members on t/11writer.t +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +According to the XML-RPC specification, key order in structure is not +significant. + +CPAN RT#94402 + +Signed-off-by: Petr Písař <ppisar@xxxxxxxxxx> +--- + t/11writer.t | 41 +++++++++++++++++++++++++---------------- + 1 file changed, 25 insertions(+), 16 deletions(-) + +diff --git a/t/11writer.t b/t/11writer.t +index a0f79e7..a04bb27 100755 +--- a/t/11writer.t ++++ b/t/11writer.t +@@ -28,7 +28,17 @@ sub TestBasic() { + scalar($now), + { "a" => BZ::Client::XMLRPC::int->new(0), "b" => "xyz" } ]; + my $contents = $xmlrpc->create_request("someMethod", $input); +- my $expect = ++ my $membera = ++ "<member>" ++ . "<name>a</name>" ++ . "<value><i4>0</i4></value>" ++ . "</member>"; ++ my $memberb = ++ "<member>" ++ . "<name>b</name>" ++ . "<value>xyz</value>" ++ . "</member>"; ++ my $prefix = + "<methodCall>" + . "<methodName>someMethod</methodName>" + . "<params>" +@@ -49,26 +59,25 @@ sub TestBasic() { + . "<param><value><dateTime.iso8601>2011-09-19T17:09:03Z</dateTime.iso8601></value></param>" + . "<param>" + . "<value>" +- . "<struct>" +- . "<member>" +- . "<name>a</name>" +- . "<value><i4>0</i4></value>" +- . "</member>" +- . "<member>" +- . "<name>b</name>" +- . "<value>xyz</value>" +- . "</member>" +- . "</struct>" ++ . "<struct>"; ++ my $suffix = ++ "</struct>" + . "</value>" + . "</param>" + . "</params>" + ."</methodCall>\n"; +- if ($contents ne $expect) { +- print STDERR "Expect: $expect\n"; +- print STDERR "Got: $contents\n"; +- return 0; ++ my $expect; ++ $expect = $prefix . $membera . $memberb . $suffix; ++ if ($contents eq $expect) { ++ return 1; + } +- return 1; ++ $expect = $prefix . $memberb . $membera . $suffix; ++ if ($contents eq $expect) { ++ return 1; ++ } ++ print STDERR "Expect: $expect\n"; ++ print STDERR "Got: $contents\n"; ++ return 0; + } + + sub TestGetProducts() { +-- +1.9.0 + diff --git a/perl-BZ-Client.spec b/perl-BZ-Client.spec index 834d291..ccadae9 100644 --- a/perl-BZ-Client.spec +++ b/perl-BZ-Client.spec @@ -1,12 +1,14 @@ Name: perl-BZ-Client Version: 1.04 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A client for the Bugzilla web services API License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/BZ-Client/ Source0: http://www.cpan.org/authors/id/J/JW/JWIED/BZ-Client-%{version}.tar.gz Patch0: perl-BZ-Client-bugzilla-dates.patch +# Fix test to expect random hash keys, bug #1084032, CPAN RT#94402 +Patch1: BZ-Client-1.04-Expect-perturbed-structure-members-on-t-11writer.t.patch BuildArch: noarch BuildRequires: perl(Data::Dumper) BuildRequires: perl(DateTime) @@ -33,6 +35,7 @@ This module provides an interface to the Bugzilla web services API. chmod 644 Changes README LICENSE %patch0 +%patch1 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor @@ -56,6 +59,9 @@ make test %{_mandir}/man3/* %changelog +* Fri Apr 18 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 1.04-10 +- Fix test to expect random hash keys (bug #1084032) + * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.04-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel