Bugzilla – Attachment 145770 Details for
Bug 32741
Attribute codes should not be repeated in bib1.att
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32741: Regression tests
Bug-32741-Regression-tests.patch (text/plain), 1.89 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-01-27 19:06:00 UTC
(
hide
)
Description:
Bug 32741: Regression tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-01-27 19:06:00 UTC
Size:
1.89 KB
patch
obsolete
>From 0883115a02c01051f29057593bd5b37271899e75 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 27 Jan 2023 15:59:52 -0300 >Subject: [PATCH] Bug 32741: Regression tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > xt/verify_bib1.att.t | 47 ++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > create mode 100755 xt/verify_bib1.att.t > >diff --git a/xt/verify_bib1.att.t b/xt/verify_bib1.att.t >new file mode 100755 >index 00000000000..aca317670dc >--- /dev/null >+++ b/xt/verify_bib1.att.t >@@ -0,0 +1,47 @@ >+#!/usr/bin/perl >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use Test::More tests => 2; >+ >+foreach my $record_type ( qw( biblios authorities ) ) { >+ >+ subtest "bib1.att tests for $record_type" => sub { >+ >+ my $bib1_att = "etc/zebradb/$record_type/etc/bib1.att"; >+ >+ my $att_codes = {}; >+ >+ open my $fh, '<', $bib1_att or die "Cannot open file $bib1_att: $!\n"; >+ >+ while (<$fh>) { >+ >+ chomp; >+ >+ if ( $_ =~ m/^att\s(?<code>\d+)/ ) { >+ $att_codes->{ $+{code} }++; >+ } >+ } >+ >+ foreach my $code (keys %{$att_codes}) { >+ is( $att_codes->{$code}, 1, "Only one occurrence for code ($code)" ); >+ } >+ }; >+} >+ >+1; >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32741
:
145770
|
145773
|
145777
|
145778
|
145936
|
145937