mirror of https://github.com/zlatinb/muwire
update split pattern and add unit test
parent
2aa73c203a
commit
b2e43f9765
|
@ -11,5 +11,5 @@ class Constants {
|
||||||
|
|
||||||
public static final float DOWNLOAD_SEQUENTIAL_RATIO = 0.8f
|
public static final float DOWNLOAD_SEQUENTIAL_RATIO = 0.8f
|
||||||
|
|
||||||
public static final String SPLIT_PATTERN = "[\\+-,\\.:;\\(\\)=_/\\\\\\!\\\"\\\'\\\$%\\|]"
|
public static final String SPLIT_PATTERN = "[\\+\\-,\\.:;\\(\\)=_/\\\\\\!\\\"\\\'\\\$%\\|]"
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,4 +83,11 @@ class SearchIndexTest {
|
||||||
assert found.size() == 1
|
assert found.size() == 1
|
||||||
assert found.contains("b c.d")
|
assert found.contains("b c.d")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testDuplicateTerm() {
|
||||||
|
initIndex(["MuWire-0.3.3.jar"])
|
||||||
|
def found = index.search(["muwire", "0", "3", "jar"])
|
||||||
|
assert found.size() == 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue