Bugzilla – Attachment 120226 Details for
Bug 28234
TestBuilder->build_sample_biblio does not deal correctly with encoding
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28234: TestBuilder->build_sample_biblio should set UTF-8 encoding for record
Bug-28234-TestBuilder-buildsamplebiblio-should-set.patch (text/plain), 1.31 KB, created by
Martin Renvoize (ashimema)
on 2021-04-27 13:35:33 UTC
(
hide
)
Description:
Bug 28234: TestBuilder->build_sample_biblio should set UTF-8 encoding for record
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-27 13:35:33 UTC
Size:
1.31 KB
patch
obsolete
>From 85fa9e4e174e0458860cb54535381f9c02a76229 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 27 Apr 2021 08:24:57 -0300 >Subject: [PATCH] Bug 28234: TestBuilder->build_sample_biblio should set UTF-8 > encoding for record > >This patch makes the build_sample_biblio method, correctly set the UTF-8 >flag for the MARC::Record object. > >Tests are added. > >To test: >1. Apply the regression tests patch >2. Run: > $ kshell > k$ prove t/db_dependent/TestBuilder.t >FAIL: Tests fail! An unexpected encoding warning shows >3. Apply this patch >4. Repeat 2 >=> SUCCESS: No warning! Tests pass! >5. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/lib/TestBuilder.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/t/lib/TestBuilder.pm b/t/lib/TestBuilder.pm >index 26de949fb3..a39be70866 100644 >--- a/t/lib/TestBuilder.pm >+++ b/t/lib/TestBuilder.pm >@@ -155,6 +155,8 @@ sub build_sample_biblio { > my $marcflavour = C4::Context->preference('marcflavour'); > > my $record = MARC::Record->new(); >+ $record->encoding( 'UTF-8' ); >+ > my ( $tag, $subfield ) = $marcflavour eq 'UNIMARC' ? ( 200, 'a' ) : ( 245, 'a' ); > $record->append_fields( > MARC::Field->new( $tag, ' ', ' ', $subfield => $title ), >-- >2.20.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 28234
:
120205
|
120212
|
120214
|
120215
|
120225
| 120226