From 65dd4c1969b0f9f9826b8ba1363c058de3172fef Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 24 Oct 2018 11:53:07 +0000 Subject: [PATCH] Bug 21581: Unit tests and updated data To test: 1 - Apply this patch only 2 - prove -v t/db_dependent/Search.t 3 - It fails 4 - Apply second patch 5 - prove -v t/db_dependent/Search.t 6 - It passes! --- t/db_dependent/Search.t | 7 ++++++- t/db_dependent/data/marc21/zebraexport/authority/exported_records | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index 67a4348..d4a749a 100644 --- a/t/db_dependent/Search.t +++ b/t/db_dependent/Search.t @@ -730,6 +730,11 @@ ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' ['沙士北亞威廉姆'], 0, 10, '', '', 1 ); is($count, 1, 'MARC21 authorities: one hit on match contains "沙士北亞威廉姆"'); + ($auths, $count) = SearchAuthorities( + ['LC-card-number'], ['and'], [''], ['contains'], + ['99282477'], 0, 10, '', '', 1 + ); + is($count, 1, 'MARC21 authorities: one hit on LC-card-number contains "99282477"'); $UseQueryParser = 1; @@ -929,7 +934,7 @@ sub run_unimarc_search_tests { } subtest 'MARC21 + DOM' => sub { - plan tests => 108; + plan tests => 109; run_marc21_search_tests(); }; diff --git a/t/db_dependent/data/marc21/zebraexport/authority/exported_records b/t/db_dependent/data/marc21/zebraexport/authority/exported_records index d0b7de0..930c945 100644 --- a/t/db_dependent/data/marc21/zebraexport/authority/exported_records +++ b/t/db_dependent/data/marc21/zebraexport/authority/exported_records @@ -1 +1 @@ -07862cz a2201717n 45000010002000000030004000020050017000060080041000230100031000640350023000950400145001180460037002630460023003000530019003231000037003423700080003793720012004593740017004713740022004883740018005103750009005283770008005374000036005454000037005814000037006184000035006554000036006904000033007264000028007594000041007874000034008284000031008624000031008934000027009244000037009514000037009884000031010254000047010564000034011034000039011374000038011764000024012144000026012384000033012644000039012974000035013364000039013714000025014104000039014354000034014744000040015084000042015484000030015904000041016204000043016614000038017044000029017424000028017714000026017994000045018254000045018704000049019154000040019644000035020044000033020394000045020724000043021174000041021604000023022014000049022244000037022734000049023104000050023594000040024094000019024494000025024684000047024934000035025404000037025754000049026124000038026614000045026994000047027444000036027914000019028274000035028464000017028814000023028984000033029214000045029544000043029994000029030424000031030714000043031024000043031454000029031884000041032174000030032584000030032884000030033184000028033484000041033764000023034174000028034404000032034684000032035004000046035324000030035784000028036084000026036364000038036624000038037004000038037384000035037764000029038116670056038406670047038966700052039436700097039956700084040926700094041766700049042706700070043196700031043896700058044206700134044786700066046126700056046786700054047346700068047886700071048566700091049276700051050186700026050696700106050956700122052016700055053236700134053786700067055126700071055796700044056506700045056946700310057396780080060499420015061296DLC20131010200219.0831215n| azannaabn |b aaa  an 78095332 zsh 85120820  a(OCoLC)oca00230409 aDLCbengerdacDLCdDLCdMHdOCoLCdNjPdIUdWUdDLCdOCoLCdWUdDLCdDLC-OKdUkdSG-SiILAdCU-HEdUkdDLCdInUdOCoLCdCStdOCoLCdCStdUPB f[..1564-04-26]g1616-04-232edtf f15640426g16160423 0aPR2750bPR31121 aShakespeare, William,d1564-1616 aStratford-upon-Avon, EnglandbStratford-upon-Avon, EnglandeLondon, England aTheatre aPoet2itoamc aDramatist2itoamc aActor2itoamc amale aeng1 aShakspeare, William,d1564-16161 aŠekʻspiri, Uiliam,d1564-16161 aSaixpēr, Gouilliam,d1564-16161 aShakspere, William,d1564-16161 aShikisbīr, Wilyam,d1564-16161 aSzekspir, Wiliam,d1564-16161 aŠekspyras,d1564-16161 aShekspir, Vilʹi︠a︡m,d1564-16161 aŠekspir, Viljem,d1564-16161 aTsikinya-chaka,d1564-16161 aSha-shih-pi-ya,d1564-16161 aShashibiya,d1564-16161 aSheḳspir, Ṿilyam,d1564-16161 aShaḳspir, Ṿilyam,d1564-16161 aSyeiksŭpʻio,d1564-16161 aShekspir, V.q(Vilʹi︠a︡m),d1564-16161 aSzekspir, William,d1564-16161 aShakespeare, Guglielmo,d1564-16161 aShake-speare, William,d1564-16160 aSha-ō,d1564-16161 aŞekspir,d1564-16161 aShekspir, Uiliam,d1564-16161 aShekspir, U.q(Uiliam),d1564-16161 aŠekspir, Vilijam,d1564-16161 aṢēkspiyar, Viliyam,d1564-16161 aShakspir,d1564-16161 aShekspyr, Vyli︠e︡m,d1564-16161 aŞekspir, Velyam,d1564-16161 aṢēkspiyar, Villiyam,d1564-16161 aShēkʻspʻiyr, Vlilliam,d1564-16161 aṢēkspiyar,d1564-16161 aṢēkspiyar Mahākavi,d1564-16161 aṢēkspiyar Mahākaviya,d1564-16161 aSheḳspier, Ṿilyam,d1564-16161 aShēkʻspir,d1564-16161 aShakespeare,d1564-16160 aŚeksper,d1564-16161 aШекспир, Вильям,d1564-16161 aШекспир, Уильям,d1564-16161 aשייקספיר, וויליאם,d1564-16161 aשייקספיר, וו.,d1564-16161 aשיקספיר, וויליאם1 aשיקספיר, ויליאם1 aשיקספיר, ויליאם,d1564-16161 aשכספיר, ויליאם,d1564-16161 aשכספיר, וילים,d1564-16161 aשכספיר, ו׳1 aשעפקספיר, וויליאם,d1564-16161 aשעקספיער, וויליאם1 aשעקספיער, וויליאם,d1564-16161 aשעקספיער, ווילליאםd1564-16161 aשעקספיער, וו.,d1564-16161 aשעקספיר1 aשעקספיר, וו1 aשעקספיר, וויליאם,d1564-16161 aשעקספיר, וויליאמ1 aשעקספיר, ווילליאם1 aשעקספיר, ווילליאם,d1564-16161 aשעקספיר, וו.,d1564-16161 aשעקספיר, װיליאם,d1564-16161 aשעקספיר, װילליאם,d1564-16161 aשעקספיר, װ.,d1564-16161 aשעקספער1 aשעקספער, וויליאמ1 aשקספיר1 aשקספיר, וו1 aשקספיר, וויליאם1 aשקספיר, וויליאם,d1564-16161 aשקספיר, ווילים,d1564-16161 aשקספיר, וילאם1 aשקספיר, ויליאם1 aשקספיר, ויליאם,d1564-16161 aשקספיר, ויליים,d1564-16161 aשקספיר, וילים1 aשקספיר, וילים,d1564-16161 aشاكسبير، وليم1 aشاكسپير، وليم1 aشكسبير، وليام1 aشكسبير، وليم1 aشكسبير، وليم،d1564-16161 aشكسبير، و.1 aشكسپير، وليم1 aشكسپير، ويليام1 aشيكسبير، وليام1 aشيكسبير، وليام.،d1564-16161 aشيكسبير، وليم1 aشکسبير، وليم1 aوليم شکسبير1 a沙士北亞威廉姆,d1564-16161 a沙士比亞威廉姆,d1564-16161 a莎士比亞威廉姆,d1564-16161 a莎士比亞威廉,d1564-16161 a莎士比亞,d1564-1616 aMachine-derived non-Latin script reference project. aNon-Latin script references not evaluated. aPlessow, G. L. Um Shakespeares nordentum, 1937. aSha-shih-pi-ya yen chiu wen chi, 1982 (subj.)bt.p. (Sha-shih-pi-ya) cover p. 4 (Shashibiya) aHis The plays and poems of William Shakspeare, 1966:bt.p. (William Shakspeare) aHamleṭ ṿe-Sheḳspir, c1983:bp. 19 (Ṿilyam Sheḳspir; b. 4-26-1564; d. 4-25-1616) aSyeiksŭpʻio, 1978:bt.p. (Syeiksŭpʻio) aIskusstvo klassicheskogo monologa [SR] 19--:blabel (V. Shekspir) aUiliam Šekʻspiri, 1996. aHelsztyński, S. Wizerunek Williama Szekspira, 1947. anuc86-2792: Doccioli, M. Fonti italiane dei drammi di Guglielmo Shakespeare [MI] 1914b(hdg.: on NIC rept.: Shakespeare, William) aHis Shake-speares sonnets, 1984:bt.p. (William Shake-speare) aHis Toroirasu to Kureshida, 1927:bp. 290 (Sha-ō) aNihon kokugo d.j.b(Sha-ō: Shakespeare William) aHis Kral Lir, 1912:bt.p. (Şekspir; W. Shakespeare [in rom.]) aUiliam Shekspir, 1982:bt.p. (Uiliam Shekspir) cover (U. Shekspir) aObradović, M. "Narodna demokratija" u Jugoslaviji, 1995:bp. [5] (Vilijam Šekspir) aHāmleṭ, 1962:bt.p (Viliyam Ṣēkspiyar) aNāy Shakspir, 1972. aBL auth. file, 10 Nov. 2004b(refs.: Shekspyr, Vyli︠e︡m, 1564-1616; Şekspir, Velyam, 1564-1616) aSILAS database, Dec. 28, 2004b(hdg.: Shakespeare, William, 1564-1616; usages: Villiyam Ṣēkspiyar; Ṣēkspiyar) aRu̇miyoo Ju̇liy-e qoyar, 1988:bt.p. (Śeksper) aLC database, Dec. 28, 2004b(hdg.: Shakespeare, William, 1564-1616; usages: Ṣēkspiyar Mahākavi; Ṣēkspiyar Mahākaviya) aYulius Tsezar, 1918:bt.p. (Ṿilyam Sheḳspier [part. voc.]) aHṛomēos ew Ciwleēdda, 1866:bp. 9 (Vlilliam Shēkʻspʻiyr) aArkʻay Lir, 2006:bt.p. (Shēkʻspir) aHark, hark the lark, 1934b(Shakespeare) aEncyclopedia Britannica, via WWW, Aug. 31, 2012b(William Shakespeare; William Shakspere; byname Bard of Avon or Swan of Avon; baptized Apr. 26, 1564 in Stratford-upon-Avon, Warwickshire, Eng.; d. Apr. 23, 1616 in Stratford-upon-Avon; English poet, dramatist, and actor; worked in London from around 1592)0 aWilliam Shakespeare (1564-1616) was an English poet, playwright, and actor. aPERSO_NAME \ No newline at end of file +08502cz a2201729n 45000010002000000030004000020050017000060080041000230100031000640350023000950400145001180460037002630460023003000530019003231000037003423700080003793720012004593740017004713740022004883740018005103750009005283770008005374000036005454000037005814000037006184000035006554000036006904000033007264000028007594000041007874000034008284000031008624000031008934000027009244000037009514000037009884000031010254000047010564000034011034000039011374000038011764000024012144000026012384000033012644000039012974000035013364000039013714000025014104000039014354000034014744000040015084000042015484000030015904000041016204000043016614000038017044000029017424000028017714000026017994000045018254000045018704000061019154000052019764000047020284000045020754000057021204000055021774000053022324000035022854000061023204000049023814000061024304000062024914000052025534000031026054000037026364000059026734000047027324000049027794000061028284000050028894000057029394000059029964000048030554000031031034000047031344000029031814000035032104000045032454000057032904000055033474000041034024000043034434000055034864000055035414000041035964000053036374000042036904000042037324000042037744000040038164000053038564000035039094000040039444000044039844000044040284000058040724000042041304000040041724000038042124000038042504000038042884000038043264000035043644000029043996670056044286670047044846700052045316700097045836700084046806700094047646700049048586700070049076700031049776700058050086700134050666700066052006700056052666700054053226700068053766700071054446700091055156700051056066700026056576700106056836700122057896700055059116700134059666700067061006700071061676700044062386700045062826700040063276700310063676780080066779420015067576DLC20131010200219.0831215n| azannaabn |b aaa  an 78095332 zsh 85120820  a(OCoLC)oca00230409 aDLCbengerdacDLCdDLCdMHdOCoLCdNjPdIUdWUdDLCdOCoLCdWUdDLCdDLC-OKdUkdSG-SiILAdCU-HEdUkdDLCdInUdOCoLCdCStdOCoLCdCStdUPB f[..1564-04-26]g1616-04-232edtf f15640426g16160423 0aPR2750bPR31121 aShakespeare, William,d1564-1616 aStratford-upon-Avon, EnglandbStratford-upon-Avon, EnglandeLondon, England aTheatre aPoet2itoamc aDramatist2itoamc aActor2itoamc amale aeng1 aShakspeare, William,d1564-16161 aŠekʻspiri, Uiliam,d1564-16161 aSaixpēr, Gouilliam,d1564-16161 aShakspere, William,d1564-16161 aShikisbīr, Wilyam,d1564-16161 aSzekspir, Wiliam,d1564-16161 aŠekspyras,d1564-16161 aShekspir, Vilʹi︠a︡m,d1564-16161 aŠekspir, Viljem,d1564-16161 aTsikinya-chaka,d1564-16161 aSha-shih-pi-ya,d1564-16161 aShashibiya,d1564-16161 aSheḳspir, Ṿilyam,d1564-16161 aShaḳspir, Ṿilyam,d1564-16161 aSyeiksŭpʻio,d1564-16161 aShekspir, V.q(Vilʹi︠a︡m),d1564-16161 aSzekspir, William,d1564-16161 aShakespeare, Guglielmo,d1564-16161 aShake-speare, William,d1564-16160 aSha-ō,d1564-16161 aŞekspir,d1564-16161 aShekspir, Uiliam,d1564-16161 aShekspir, U.q(Uiliam),d1564-16161 aŠekspir, Vilijam,d1564-16161 aṢēkspiyar, Viliyam,d1564-16161 aShakspir,d1564-16161 aShekspyr, Vyli︠e︡m,d1564-16161 aŞekspir, Velyam,d1564-16161 aṢēkspiyar, Villiyam,d1564-16161 aShēkʻspʻiyr, Vlilliam,d1564-16161 aṢēkspiyar,d1564-16161 aṢēkspiyar Mahākavi,d1564-16161 aṢēkspiyar Mahākaviya,d1564-16161 aSheḳspier, Ṿilyam,d1564-16161 aShēkʻspir,d1564-16161 aShakespeare,d1564-16160 aŚeksper,d1564-16161 aШекспир, Вильям,d1564-16161 aШекспир, Уильям,d1564-16161 aשייקספיר, וויליאם,‪‪‪‪d1564-16161 aשייקספיר, וו.,‪‪‪‪d1564-16161 aשיקספיר, וויליאם‪‪‪‪1 aשיקספיר, ויליאם‪‪‪‪1 aשיקספיר, ויליאם,‪‪‪‪d1564-16161 aשכספיר, ויליאם,‪‪‪‪d1564-16161 aשכספיר, וילים,‪‪‪‪d1564-16161 aשכספיר, ו׳‪‪‪‪1 aשעפקספיר, וויליאם,‪‪‪‪d1564-16161 aשעקספיער, וויליאם‪‪‪‪1 aשעקספיער, וויליאם,‪‪‪‪d1564-16161 aשעקספיער, ווילליאם‪‪‪‪d1564-16161 aשעקספיער, וו.,‪‪‪‪d1564-16161 aשעקספיר‪‪‪‪1 aשעקספיר, וו‪‪‪‪1 aשעקספיר, וויליאם,‪‪‪‪d1564-16161 aשעקספיר, וויליאמ‪‪‪‪1 aשעקספיר, ווילליאם‪‪‪‪1 aשעקספיר, ווילליאם,‪‪‪‪d1564-16161 aשעקספיר, וו.,‪‪‪‪d1564-16161 aשעקספיר, װיליאם,‪‪‪‪d1564-16161 aשעקספיר, װילליאם,‪‪‪‪d1564-16161 aשעקספיר, װ.,‪‪‪‪d1564-16161 aשעקספער‪‪‪‪1 aשעקספער, וויליאמ‪‪‪‪1 aשקספיר‪‪‪‪1 aשקספיר, וו‪‪‪‪1 aשקספיר, וויליאם‪‪‪‪1 aשקספיר, וויליאם,‪‪‪‪d1564-16161 aשקספיר, ווילים,‪‪‪‪d1564-16161 aשקספיר, וילאם‪‪‪‪1 aשקספיר, ויליאם‪‪‪‪1 aשקספיר, ויליאם,‪‪‪‪d1564-16161 aשקספיר, ויליים,‪‪‪‪d1564-16161 aשקספיר, וילים‪‪‪‪1 aשקספיר, וילים,‪‪‪‪d1564-16161 aشاكسبير، وليم‪‪‪‪1 aشاكسپير، وليم‪‪‪‪1 aشكسبير، وليام‪‪‪‪1 aشكسبير، وليم‪‪‪‪1 aشكسبير، وليم،‪‪‪‪d1564-16161 aشكسبير، و.‪‪‪‪1 aشكسپير، وليم‪‪‪‪1 aشكسپير، ويليام‪‪‪‪1 aشيكسبير، وليام‪‪‪‪1 aشيكسبير، وليام.،‪‪‪‪d1564-16161 aشيكسبير، وليم‪‪‪‪1 aشکسبير، وليم‪‪‪‪1 aوليم شکسبير‪‪‪‪1 a沙士北亞威廉姆,d1564-16161 a沙士比亞威廉姆,d1564-16161 a莎士比亞威廉姆,d1564-16161 a莎士比亞威廉,d1564-16161 a莎士比亞,d1564-1616 aMachine-derived non-Latin script reference project. aNon-Latin script references not evaluated. aPlessow, G. L. Um Shakespeares nordentum, 1937. aSha-shih-pi-ya yen chiu wen chi, 1982 (subj.)bt.p. (Sha-shih-pi-ya) cover p. 4 (Shashibiya) aHis The plays and poems of William Shakspeare, 1966:bt.p. (William Shakspeare) aHamleṭ ṿe-Sheḳspir, c1983:bp. 19 (Ṿilyam Sheḳspir; b. 4-26-1564; d. 4-25-1616) aSyeiksŭpʻio, 1978:bt.p. (Syeiksŭpʻio) aIskusstvo klassicheskogo monologa [SR] 19--:blabel (V. Shekspir) aUiliam Šekʻspiri, 1996. aHelsztyński, S. Wizerunek Williama Szekspira, 1947. anuc86-2792: Doccioli, M. Fonti italiane dei drammi di Guglielmo Shakespeare [MI] 1914b(hdg.: on NIC rept.: Shakespeare, William) aHis Shake-speares sonnets, 1984:bt.p. (William Shake-speare) aHis Toroirasu to Kureshida, 1927:bp. 290 (Sha-ō) aNihon kokugo d.j.b(Sha-ō: Shakespeare William) aHis Kral Lir, 1912:bt.p. (Şekspir; W. Shakespeare [in rom.]) aUiliam Shekspir, 1982:bt.p. (Uiliam Shekspir) cover (U. Shekspir) aObradović, M. "Narodna demokratija" u Jugoslaviji, 1995:bp. [5] (Vilijam Šekspir) aHāmleṭ, 1962:bt.p (Viliyam Ṣēkspiyar) aNāy Shakspir, 1972. aBL auth. file, 10 Nov. 2004b(refs.: Shekspyr, Vyli︠e︡m, 1564-1616; Şekspir, Velyam, 1564-1616) aSILAS database, Dec. 28, 2004b(hdg.: Shakespeare, William, 1564-1616; usages: Villiyam Ṣēkspiyar; Ṣēkspiyar) aRu̇miyoo Ju̇liy-e qoyar, 1988:bt.p. (Śeksper) aLC database, Dec. 28, 2004b(hdg.: Shakespeare, William, 1564-1616; usages: Ṣēkspiyar Mahākavi; Ṣēkspiyar Mahākaviya) aYulius Tsezar, 1918:bt.p. (Ṿilyam Sheḳspier [part. voc.]) aHṛomēos ew Ciwleēdda, 1866:bp. 9 (Vlilliam Shēkʻspʻiyr) aArkʻay Lir, 2006:bt.p. (Shēkʻspir) aHark, hark the lark, 1934b(Shakespeare) aHis My cellphone number is 99282477 aEncyclopedia Britannica, via WWW, Aug. 31, 2012b(William Shakespeare; William Shakspere; byname Bard of Avon or Swan of Avon; baptized Apr. 26, 1564 in Stratford-upon-Avon, Warwickshire, Eng.; d. Apr. 23, 1616 in Stratford-upon-Avon; English poet, dramatist, and actor; worked in London from around 1592)0 aWilliam Shakespeare (1564-1616) was an English poet, playwright, and actor. aPERSO_NAME00789cz a2200217n 45000010005000000030004000050050017000090080041000260100017000670400023000840530018001071000016001254000012001414000016001534000014001694000027001836700192002106700084004026700070004869420015005561709DLC20181024104214.0991028n| acannaabn |a aaa  an 99282477  aDLCbengcDLCdDLC 0aPS3556.O391731 aFoley, Mick0 aMankind0 aCactus Jack0 aDude Love1 aFoley, Michael Francis aHis Have a nice day! 2000:bCIP t.p. (Mankind) galley (Mick Foley; professional wrestler who has taken on various names in his career: Dude Love, Cactus Jack, and, most recently, Mankind) aMick Foley tribute page (WWW), Oct. 28, 1999b(Cactus Jack, Dude Love, Mankind) aMick Foley, c2000:bp. 7 (Michael Francis Foley, b. July 7, 1965) aPERSO_NAME \ No newline at end of file -- 2.1.4