Bugzilla – Attachment 165730 Details for
Bug 32392
Ability to skip forward serial issues when receiving double (or more) issue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32392: Tests for changes in C4::Serials::GetNextSeq
Bug-32392-Tests-for-changes-in-C4SerialsGetNextSeq.patch (text/plain), 2.28 KB, created by
Kevin Carnes
on 2024-04-29 11:43:19 UTC
(
hide
)
Description:
Bug 32392: Tests for changes in C4::Serials::GetNextSeq
Filename:
MIME Type:
Creator:
Kevin Carnes
Created:
2024-04-29 11:43:19 UTC
Size:
2.28 KB
patch
obsolete
>From ed1a08b67abe579c4cc66aaa5a03dd91bc9104f5 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Nyl=C3=A9n?= <bjorn.nylen@ub.lu.se> >Date: Thu, 1 Dec 2022 23:32:15 +0100 >Subject: [PATCH] Bug 32392: Tests for changes in C4::Serials::GetNextSeq > >Signed-off-by: Marie Hedbom <marie.hedbom@musikverket.se> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/Serials/GetNextSeq.t | 31 ++++++++++++++++++++++++++++--- > 1 file changed, 28 insertions(+), 3 deletions(-) > >diff --git a/t/Serials/GetNextSeq.t b/t/Serials/GetNextSeq.t >index c1cf423f3d..63a7f3c73e 100755 >--- a/t/Serials/GetNextSeq.t >+++ b/t/Serials/GetNextSeq.t >@@ -1,7 +1,7 @@ > #!/usr/bin/perl > > use Modern::Perl; >-use Test::More tests => 43; >+use Test::More tests => 46; > use C4::Serials qw( GetNextSeq ); > > # TEST CASE 1 - 1 variable, from 1 to 4 >@@ -222,13 +222,38 @@ is($seq, 'Z: 12, Y: 8, X: 4'); > $seq = _next_seq($subscription, $pattern); > is($seq, 'Z: 1, Y: 1, X: 1'); > >+# TEST CASE 7 . Specify how many issues to count forward, 1 variable, from 1 to 4 >+ >+$subscription = { >+ lastvalue1 => 1, lastvalue2 => 1, lastvalue3 => 1, >+ innerloop1 => 0, innerloop2 => 0, innerloop3 => 0, >+ skip_serialseq => 0, >+ irregularity => '', >+ locale => 'en', >+}; >+$pattern = { >+ add1 => 1, add2 => 0, add3 => 0, >+ every1 => 1, every2 => 0, every3 => 0, >+ whenmorethan1 => 4, whenmorethan2 => 0, whenmorethan3 => 0, >+ setto1 => 1, setto2 => 0, setto3 => 0, >+ numberingmethod => 'X: {X}', >+ numbering1 => '', >+ numbering2 => '', >+ numbering3 => '', >+}; >+$seq = _next_seq($subscription, $pattern, 1); >+is($seq, 'X: 2'); >+$seq = _next_seq($subscription, $pattern, 2); >+is($seq, 'X: 4'); >+$seq = _next_seq($subscription, $pattern, 2); >+is($seq, 'X: 2'); > > sub _next_seq { >- my ($subscription, $pattern) = @_; >+ my ($subscription, $pattern, $count_forward) = @_; > my $seq; > ($seq, $subscription->{lastvalue1}, $subscription->{lastvalue2}, > $subscription->{lastvalue3}, $subscription->{innerloop1}, > $subscription->{innerloop2}, $subscription->{innerloop3}) = >- GetNextSeq($subscription, $pattern); >+ GetNextSeq($subscription, $pattern, undef, undef, $count_forward); > return $seq; > } >-- >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 32392
:
148948
|
148949
|
159617
|
159618
|
165083
|
165084
|
165085
|
165729
| 165730 |
165731