Bugzilla – Attachment 163162 Details for
Bug 36190
op param for stateful requests must start with 'cud-'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36190: Adjust the test
Bug-36190-Adjust-the-test.patch (text/plain), 2.02 KB, created by
Marcel de Rooy
on 2024-03-15 07:55:31 UTC
(
hide
)
Description:
Bug 36190: Adjust the test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-03-15 07:55:31 UTC
Size:
2.02 KB
patch
obsolete
>From 81e76d0e282c6fdb7faf24aaed1bf174f198eaf1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 28 Feb 2024 14:06:12 +0100 >Subject: [PATCH] Bug 36190: Adjust the test >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > xt/find-missing-op-in-forms.t | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >diff --git a/xt/find-missing-op-in-forms.t b/xt/find-missing-op-in-forms.t >index 18098e8b35..266560e6eb 100755 >--- a/xt/find-missing-op-in-forms.t >+++ b/xt/find-missing-op-in-forms.t >@@ -39,7 +39,7 @@ for my $file ( @files ) { > push @errors, sprintf "%s:%s", $file, join (",", @e) if @e; > } > >-is( @errors, 0, "The <form> in the following files are missing it's corresponding op parameter (see bug 34478)" ) >+is( @errors, 0, "The <form> in the following files are missing it's corresponding op parameter, or op does not start with 'cud-' (see bug 34478)" ) > or diag( Dumper @errors ); > > sub catch_missing_op { >@@ -48,7 +48,7 @@ sub catch_missing_op { > my @lines = read_file($file); > my @errors; > return unless grep { $_ =~ m|<form| } @lines; >- my ( $in_form, $closed_form, $line_open_form, $has_op ); >+ my ( $in_form, $closed_form, $line_open_form, $has_op, $op_value ); > my $line_number = 0; > for my $line (@lines) { > $line_number++; >@@ -58,10 +58,17 @@ sub catch_missing_op { > } > if ( $in_form && $line =~ m{name="op"} ) { > $has_op = 1; >+ if ( $line =~ m{value="(.*)"} ) { >+ $op_value = $1 >+ } > } > if ( $in_form && $line =~ m{</form} ) { > $closed_form = 0; >- unless ($has_op) { >+ if ($has_op) { >+ unless ( $op_value =~ m{^cud-} ) { >+ push @errors, $line_open_form; >+ } >+ } else { > push @errors, $line_open_form; > } > $in_form = 0; >-- >2.30.2
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 36190
:
162530
|
162531
|
163110
|
163111
|
163112
|
163149
|
163150
|
163151
|
163152
| 163162 |
163163
|
163164
|
163165