Skip to content

Commit

Permalink
feat: added krivoduski into unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Mar 11, 2022
1 parent 3be632e commit 8a11bcf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static ArrayList<String> getAsciiTransliteratedVariants(String a) {
}

// handle russian name stuff
HashSet<String> transRus = transliterateRussianNames(synonyms);
HashSet<String> transRus = transliterateRussianNames(synonyms );
synonyms.addAll(transRus);

// apostrophes are now preserved in the index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,11 @@ public void xtestX() throws Exception {

public void testAuthorParsingUseCases() throws Exception {

testAuthorQuery("\"krivodubski, v\"",
"",
"//*[@numFound='0']"
);

assertQueryEquals(req("q", "author:\"van dok*, h\""), "author:van dok*, h", WildcardQuery.class);
assertQ(req("q", "author:\"van dok*, h\""),
"//*[@numFound='1']",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public void testAccents() throws Exception {
checkIt("Duprè", "Duprè", "Dupre,"); // Dupre\\xcc\\x80
checkIt("\u0141", "Ł", "L,");
checkIt("Mendigutıa", "Mendigutıa", "Mendigutia,");
checkIt("krivodubski, v", "krivodubski, v", "krivodubskyi, v", "krivodubsky, v", "krivodubskij, v", "krivodubskiy, v", "krivodubskii, v" );

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public void testTransliterations() {
check("FOOVI, BAR", "FOOVYI, BAR", "FOOVII, BAR", "FOOVY, BAR", "FOOVIY, BAR", "FOOVIJ, BAR");
check("FOO, YURI", "FOO, IURI");
check("FOO, IAGNI", "FOO, YAGNI");
check("krivodubski, v", "krivodubskii, v", "krivodubskij, v", "krivodubskiy, v", "krivodubsky, v", "krivodubskyi, v");
}

public void testTransRussianNames() {
Expand Down

0 comments on commit 8a11bcf

Please sign in to comment.