Bugzilla – Attachment 31580 Details for
Bug 12898
Z39.50 title search doesn't work with multiple words
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12898: (regression test) test terms inside double quotes
Bug-12898-regression-test-test-terms-inside-double.patch (text/plain), 2.13 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-09-14 05:04:28 UTC
(
hide
)
Description:
Bug 12898: (regression test) test terms inside double quotes
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-09-14 05:04:28 UTC
Size:
2.13 KB
patch
obsolete
>From cc063de044769e047e53d8afc636a22772af1d0e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Sun, 14 Sep 2014 01:55:33 -0300 >Subject: [PATCH] Bug 12898: (regression test) test terms inside double quotes > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >--- > t/db_dependent/Breeding.t | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Breeding.t b/t/db_dependent/Breeding.t >index 1f43852..6cfd684 100644 >--- a/t/db_dependent/Breeding.t >+++ b/t/db_dependent/Breeding.t >@@ -21,6 +21,7 @@ use Modern::Perl; > > use FindBin; > use Test::More tests => 3; >+use Test::Warn; > > use C4::Breeding; > use Koha::XSLT_Handler; >@@ -45,7 +46,7 @@ subtest '_create_connection' => sub { > }; > #Group 3: testing _do_xslt_proc (part of Z3950Search) > subtest '_do_xslt_proc' => sub { >- plan tests => 6; >+ plan tests => 7; > test_do_xslt(); > }; > >@@ -89,9 +90,12 @@ sub test_build_translate_query { > is( @matches == 2, 1, 'Second Z39.50 query includes two @attr 1='); > #We should find text of both parameters in the query > $str= $pars2->{isbn}; >- is( $queries[0] =~ /$str/, 1, 'Second query contains ISBN'); >+ is( $queries[0] =~ /\"$str\"/, 1, >+ 'Second query contains ISBN enclosed by double quotes'); > $str= $pars2->{title}; >- is( $queries[0] =~ /$str/, 1, 'Second query contains title'); >+ is( $queries[0] =~ /\"$str\"/, 1, >+ 'Second query contains title enclosed by double quotes'); >+ > #SRU revisited > $server= { sru_fields => 'isbn=nb,title=dc.title,srchany=overal' }; > $squery= C4::Breeding::_translate_query( $server, $queries[1] ); >@@ -171,7 +175,10 @@ sub test_do_xslt { > > #forcing an error on the xslt side > $server->{add_xslt} = 'notafile.xsl'; >- @res = C4::Breeding::_do_xslt_proc( $biblio, $server, $engine ); >+ warning_like >+ { @res = C4::Breeding::_do_xslt_proc( $biblio, $server, $engine ) } >+ qr/^XSLT file not found./, >+ '_do_xslt_proc warns it XSLT_handler problem'; > is( $res[1] && $res[1] eq 'xslt_err', 1, > 'Check error code again'); > #We still expect the original record back >-- >1.9.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 12898
:
31500
|
31501
|
31508
| 31580