From 2acc0af69018bf69b73ea8b021826ff14d2a8eea Mon Sep 17 00:00:00 2001 From: Roman Chyla Date: Thu, 20 Feb 2020 11:45:42 -0500 Subject: [PATCH] Fixed unittest --- .../solr/analysis/author/TestAdsabsTypeAuthorParsing.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/adsabs/src/test/org/apache/solr/analysis/author/TestAdsabsTypeAuthorParsing.java b/contrib/adsabs/src/test/org/apache/solr/analysis/author/TestAdsabsTypeAuthorParsing.java index 553088ae7..c88fbba73 100644 --- a/contrib/adsabs/src/test/org/apache/solr/analysis/author/TestAdsabsTypeAuthorParsing.java +++ b/contrib/adsabs/src/test/org/apache/solr/analysis/author/TestAdsabsTypeAuthorParsing.java @@ -658,7 +658,9 @@ public void testAuthorParsingUseCases() throws Exception { testAuthorQuery( "\"Boser, S\"", "first_author:boser, s | first_author:boser, s* | first_author:boser, | first_author:böser, s | first_author:böser, s* | first_author:böser, | first_author:boeser, s | first_author:boeser, s* | first_author:boeser,", - "//*[@numFound='1']", + "//*[@numFound='1']"); + //setDebug(true); + testAuthorQuery( "\"Böser, S\"", "first_author:böser, s | first_author:böser, s* | first_author:böser, | first_author:boeser, s | first_author:boeser, s* | first_author:boeser, | first_author:boser, s | first_author:boser, s* | first_author:boser,", "//*[@numFound='1']" @@ -2628,9 +2630,9 @@ public Query assertQueryEquals(SolrQueryRequest req, String expected, Class c if (actual.startsWith("(")) actual = actual.substring(1, actual.length()-1); - String[] ex = expected.split("(\\s\\|\\s|\\s)*[a-z]+\\:"); + String[] ex = expected.split("(\\s\\|\\s|\\s)*[a-z_]+\\:"); Arrays.sort(ex); - String[] ac = actual.split("(\\s\\|\\s|\\s)*[a-z]+\\:"); + String[] ac = actual.split("(\\s\\|\\s|\\s)*[a-z_]+\\:"); Arrays.sort(ac); StringBuffer exs = new StringBuffer(); for (String s: ex) {