public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perl-BZ-Client] epel10: Fix test to expect random hash keys
@ 2026-08-05 18:53 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-05 18:53 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/perl-BZ-Client
Branch : epel10
Commit : 4926b8e6fefab15a1c668c7a84b699787d299ecc
Author : Petr Písař <ppisar@redhat.com>
Date   : 2014-04-18T14:39:26+02:00
Stats  : +92/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/perl-BZ-Client/c/4926b8e6fefab15a1c668c7a84b699787d299ecc?branch=epel10

Log:
Fix test to expect random hash keys

---
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@redhat.com>
+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@redhat.com>
+---
+ 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@redhat.com> - 1.04-10
+- Fix test to expect random hash keys (bug #1084032)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.04-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-05 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-05 18:53 [rpms/perl-BZ-Client] epel10: Fix test to expect random hash keys 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox