Bugzilla – Attachment 25005 Details for
Bug 11202
Improve UNIMARC biblio indexing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11202: FIX UT for QueryParser.t
Bug-11202-FIX-UT-for-QueryParsert.patch (text/plain), 3.85 KB, created by
Jonathan Druart
on 2014-02-03 12:18:46 UTC
(
hide
)
Description:
Bug 11202: FIX UT for QueryParser.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-02-03 12:18:46 UTC
Size:
3.85 KB
patch
obsolete
>From 3b56d6c5f15e38aef067e746cc860dcb45705a8d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 3 Feb 2014 13:17:17 +0100 >Subject: [PATCH] Bug 11202: FIX UT for QueryParser.t > >Test plan: >prove t/QueryParser.t >--- > t/QueryParser.t | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/t/QueryParser.t b/t/QueryParser.t >index 41782f2..3b98c9a 100644 >--- a/t/QueryParser.t >+++ b/t/QueryParser.t >@@ -17,7 +17,7 @@ ok(defined $QParser, 'Successfully created empty QP object'); > ok($QParser->load_config('./etc/searchengine/queryparser.yaml'), 'Loaded QP config'); > > is($QParser->search_class_count, 4, 'Initialized 4 search classes'); >-is (scalar(@{$QParser->search_fields()->{'keyword'}}), 107, "Correct number of search fields for 'keyword' class"); >+is (scalar(@{$QParser->search_fields()->{'keyword'}}), 108, "Correct number of search fields for 'keyword' class"); > > is($QParser->target_syntax('biblioserver', 'smith'), '@or @or @attr 1=1016 @attr 4=6 "smith" @attr 9=20 @attr 2=102 @attr 4=6 "smith" @attr 9=34 @attr 2=102 @attr 4=6 "smith"', 'super simple keyword query'); > is($QParser->target_syntax('biblioserver', 'au:smith'), '@attr 1=1003 @attr 4=6 "smith"', 'simple author query'); >@@ -26,10 +26,10 @@ is($QParser->target_syntax('biblioserver', 'ti:"little engine that could"'), '@a > is($QParser->target_syntax('biblioserver', 'keyword|titlekw:smith'), '@attr 1=4 @attr 9=20 @attr 2=102 @attr 4=6 "smith"', 'relevance-bumped query'); > is($QParser->target_syntax('biblioserver', 'au:smith && johnson'), '@and @attr 1=1003 @attr 4=6 "smith" @attr 1=1003 @attr 4=6 "johnson"', 'query with boolean &&'); > is($QParser->target_syntax('biblioserver', 'au:smith && ti:johnson'), '@and @attr 1=1003 @attr 4=6 "smith" @attr 1=4 @attr 4=6 "johnson"', 'query with boolean &&'); >-is($QParser->target_syntax('biblioserver', 'au:smith pubdate(-2008)'), '@and @attr 1=1003 @attr 4=6 "smith" @attr 4=4 @attr 1=pubdate @attr 2=2 "2008"', 'keyword search with pubdate limited to -2008'); >-is($QParser->target_syntax('biblioserver', 'au:smith pubdate(2008-)'), '@and @attr 1=1003 @attr 4=6 "smith" @attr 4=4 @attr 1=pubdate @attr 2=4 "2008"', 'keyword search with pubdate limited to 2008-'); >-is($QParser->target_syntax('biblioserver', 'au:smith pubdate(2008)'), '@and @attr 1=1003 @attr 4=6 "smith" @attr 4=4 @attr 1=pubdate "2008"', 'keyword search with pubdate limited to 2008'); >-is($QParser->target_syntax('biblioserver', 'au:smith pubdate(1980,2008)'), '@and @attr 1=1003 @attr 4=6 "smith" @or @attr 4=4 @attr 1=pubdate "1980" @attr 4=4 @attr 1=pubdate "2008"', 'keyword search with pubdate limited to 1980, 2008'); >+is($QParser->target_syntax('biblioserver', 'au:smith pubdate(-2008)'), '@and @attr 1=1003 @attr 4=6 "smith" @attr 4=4 @attr 1=31 @attr 2=2 "2008"', 'keyword search with pubdate limited to -2008'); >+is($QParser->target_syntax('biblioserver', 'au:smith pubdate(2008-)'), '@and @attr 1=1003 @attr 4=6 "smith" @attr 4=4 @attr 1=31 @attr 2=4 "2008"', 'keyword search with pubdate limited to 2008-'); >+is($QParser->target_syntax('biblioserver', 'au:smith pubdate(2008)'), '@and @attr 1=1003 @attr 4=6 "smith" @attr 4=4 @attr 1=31 "2008"', 'keyword search with pubdate limited to 2008'); >+is($QParser->target_syntax('biblioserver', 'au:smith pubdate(1980,2008)'), '@and @attr 1=1003 @attr 4=6 "smith" @or @attr 4=4 @attr 1=31 "1980" @attr 4=4 @attr 1=31 "2008"', 'keyword search with pubdate limited to 1980, 2008'); > is($QParser->target_syntax('biblioserver', 'au:smith #acqdate_dsc'), '@or @attr 1=32 @attr 7=1 0 @attr 1=1003 @attr 4=6 "smith"', 'keyword search sorted by acqdate descending'); > is($QParser->bib1_mapping_by_attr('field', 'biblioserver', {'1' => '1004'})->{'field'}, 'personal', 'retrieve field by attr'); > is($QParser->bib1_mapping_by_attr_string('field', 'biblioserver', '@attr 1=1004')->{'field'}, 'personal', 'retrieve field by attrstring'); >-- >1.7.10.4
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 11202
:
22733
|
22737
|
22750
|
22973
|
23041
|
23108
|
23238
|
23348
|
23579
|
23830
|
24751
| 25005