Bugzilla – Attachment 151241 Details for
Bug 33733
Move t/XSLT.t to db_dependent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33733: Fix indentation in subtest
Bug-33733-Fix-indentation-in-subtest.patch (text/plain), 3.98 KB, created by
David Nind
on 2023-05-16 02:59:13 UTC
(
hide
)
Description:
Bug 33733: Fix indentation in subtest
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-05-16 02:59:13 UTC
Size:
3.98 KB
patch
obsolete
>From 5d610c15ee6d01e11877e37a61c2b2130de6b895 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 15 May 2023 07:05:28 +0000 >Subject: [PATCH] Bug 33733: Fix indentation in subtest > >Test plan: >git diff -w HEAD~1.. t/XSLT.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: David Nind <david@davidnind.com> >--- > t/XSLT.t | 56 ++++++++++++++++++++++++++++---------------------------- > 1 file changed, 28 insertions(+), 28 deletions(-) > >diff --git a/t/XSLT.t b/t/XSLT.t >index ee1c01e9e9..e3816fcf25 100755 >--- a/t/XSLT.t >+++ b/t/XSLT.t >@@ -32,37 +32,37 @@ my @langs = ('en', 'es-ES'); > subtest 'Tests moved from t' => sub { > plan tests => 8; > >-# create temporary files to be tested later >-foreach my $theme (@themes) { >- foreach my $lang (@langs) { >- make_path("$dir/$theme/$lang/xslt"); >- open my $fh, '>', "$dir/$theme/$lang/xslt/my_file.xslt"; >- print $fh "Theme $theme, language $lang"; >- close $fh; >+ # create temporary files to be tested later >+ foreach my $theme (@themes) { >+ foreach my $lang (@langs) { >+ make_path("$dir/$theme/$lang/xslt"); >+ open my $fh, '>', "$dir/$theme/$lang/xslt/my_file.xslt"; >+ print $fh "Theme $theme, language $lang"; >+ close $fh; >+ } > } >-} > >-sub find_and_slurp { >- my ($dir, $theme, $lang) = @_; >+ sub find_and_slurp { >+ my ($dir, $theme, $lang) = @_; > >- my $filename = C4::XSLT::_get_best_default_xslt_filename($dir, $theme, $lang, 'my_file.xslt'); >- open my $fh, '<', $filename; >- my $str = <$fh>; >- close $fh; >- return $str; >-} >+ my $filename = C4::XSLT::_get_best_default_xslt_filename($dir, $theme, $lang, 'my_file.xslt'); >+ open my $fh, '<', $filename; >+ my $str = <$fh>; >+ close $fh; >+ return $str; >+ } > >-# These tests verify that we're finding the right XSLT file when present, >-# and falling back to the right XSLT file when an exact match is not present. >-is(find_and_slurp($dir, 'test', 'en' ), 'Theme test, language en', 'Found test/en'); >-is(find_and_slurp($dir, 'test', 'es-ES'), 'Theme test, language es-ES', 'Found test/es-ES'); >-is(find_and_slurp($dir, 'prog', 'en', ), 'Theme prog, language en', 'Found test/en'); >-is(find_and_slurp($dir, 'prog', 'es-ES'), 'Theme prog, language es-ES', 'Found test/es-ES'); >-is(find_and_slurp($dir, 'test', 'fr-FR'), 'Theme test, language en', 'Fell back to test/en for test/fr-FR'); >-is(find_and_slurp($dir, 'nope', 'es-ES'), 'Theme prog, language es-ES', 'Fell back to prog/es-ES for nope/es-ES'); >-is(find_and_slurp($dir, 'nope', 'fr-FR'), 'Theme prog, language en', 'Fell back to prog/en for nope/fr-FR'); >+ # These tests verify that we're finding the right XSLT file when present, >+ # and falling back to the right XSLT file when an exact match is not present. >+ is(find_and_slurp($dir, 'test', 'en' ), 'Theme test, language en', 'Found test/en'); >+ is(find_and_slurp($dir, 'test', 'es-ES'), 'Theme test, language es-ES', 'Found test/es-ES'); >+ is(find_and_slurp($dir, 'prog', 'en', ), 'Theme prog, language en', 'Found test/en'); >+ is(find_and_slurp($dir, 'prog', 'es-ES'), 'Theme prog, language es-ES', 'Found test/es-ES'); >+ is(find_and_slurp($dir, 'test', 'fr-FR'), 'Theme test, language en', 'Fell back to test/en for test/fr-FR'); >+ is(find_and_slurp($dir, 'nope', 'es-ES'), 'Theme prog, language es-ES', 'Fell back to prog/es-ES for nope/es-ES'); >+ is(find_and_slurp($dir, 'nope', 'fr-FR'), 'Theme prog, language en', 'Fell back to prog/en for nope/fr-FR'); > >-my $matching_string = q{<syspref name="singleBranchMode">0</syspref>}; >-my $sysprefs_xml = C4::XSLT::get_xslt_sysprefs(); >-ok( $sysprefs_xml =~ m/$matching_string/, 'singleBranchMode has a value of 0'); >+ my $matching_string = q{<syspref name="singleBranchMode">0</syspref>}; >+ my $sysprefs_xml = C4::XSLT::get_xslt_sysprefs(); >+ ok( $sysprefs_xml =~ m/$matching_string/, 'singleBranchMode has a value of 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 33733
:
151185
|
151186
|
151187
|
151240
|
151241
|
151242
|
151265
|
151266
|
151267