Add test for finding literals

This commit is contained in:
Owen Stephens 2019-07-21 12:46:12 +01:00
parent 6616d01725
commit 0560b772f1

View File

@ -75,6 +75,12 @@ public class FindFunctionTests extends RefineTest {
Assert.assertEquals(matches[1], "test");
}
@Test
public void findFunctionFindLiteralTest() throws Exception {
String[] matches = (String[]) invoke("find", "This is a test string for testing find.", ".test");
Assert.assertEquals(matches.length, 0);
}
@Test
public void findFunctionFindAllTest2() throws Exception {
String[] matches = (String[]) invoke("find", "hello 123456 goodbye.", "\\d{6}|hello");