|
Lines 114-120
subtest "_search tests" => sub {
Link Here
|
| 114 |
$terms = $search_query->{query}->{bool}->{must}; |
114 |
$terms = $search_query->{query}->{bool}->{must}; |
| 115 |
$expected_terms = [ |
115 |
$expected_terms = [ |
| 116 |
{ term => { 'match-heading.ci_raw' => 'Yankovic, Al 1959' } }, |
116 |
{ term => { 'match-heading.ci_raw' => 'Yankovic, Al 1959' } }, |
| 117 |
{ term => { 'subject-heading-thesaurus.ci_raw' => 'a' } }, |
|
|
| 118 |
]; |
117 |
]; |
| 119 |
is_deeply( $terms, $expected_terms, "Search formed as expected for a non-subject field with single punctuation mark"); |
118 |
is_deeply( $terms, $expected_terms, "Search formed as expected for a non-subject field with single punctuation mark"); |
| 120 |
|
119 |
|
|
Lines 124-130
subtest "_search tests" => sub {
Link Here
|
| 124 |
$terms = $search_query->{query}->{bool}->{must}; |
123 |
$terms = $search_query->{query}->{bool}->{must}; |
| 125 |
$expected_terms = [ |
124 |
$expected_terms = [ |
| 126 |
{ term => { 'match-heading.ci_raw' => 'Yankovic, Al 1959' } }, |
125 |
{ term => { 'match-heading.ci_raw' => 'Yankovic, Al 1959' } }, |
| 127 |
{ term => { 'subject-heading-thesaurus.ci_raw' => 'a' } }, |
|
|
| 128 |
]; |
126 |
]; |
| 129 |
is_deeply( $terms, $expected_terms, "Search formed as expected for a non-subject field with double punctuation, hyphen+comma"); |
127 |
is_deeply( $terms, $expected_terms, "Search formed as expected for a non-subject field with double punctuation, hyphen+comma"); |
| 130 |
|
128 |
|
|
Lines 134-141
subtest "_search tests" => sub {
Link Here
|
| 134 |
$terms = $search_query->{query}->{bool}->{must}; |
132 |
$terms = $search_query->{query}->{bool}->{must}; |
| 135 |
$expected_terms = [ |
133 |
$expected_terms = [ |
| 136 |
{ term => { 'match-heading.ci_raw' => 'Tolkien, J.R.R' } }, |
134 |
{ term => { 'match-heading.ci_raw' => 'Tolkien, J.R.R' } }, |
| 137 |
{ term => { 'subject-heading-thesaurus.ci_raw' => 'a' } }, |
|
|
| 138 |
]; |
135 |
]; |
| 139 |
is_deeply( $terms, $expected_terms, "Search formed as expected for a non-subject field with double punctuation, period+comma "); |
136 |
is_deeply( $terms, $expected_terms, "Search formed as expected for a non-subject field with double punctuation, period+comma "); |
| 140 |
|
137 |
|
| 141 |
}; |
138 |
}; |
|
|
139 |
|