Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
looly committed May 29, 2024
1 parent 503df65 commit be39341
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions hutool-core/src/test/java/cn/hutool/core/util/ReUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,17 @@ public void issuesI5TQDRTest(){
public void issueI6GIMTTest(){
Assert.assertEquals(StrUtil.EMPTY, ReUtil.delAll("[\\s]*", " "));
}

@Test
public void issueI9T1TGTest() {
String regex = "^model";
String content = "model-v";
String result = ReUtil.get(regex, content, 0);
Assert.assertEquals("model", result);

regex = "^model.*?";
content = "model-v";
boolean match = ReUtil.isMatch(regex, content);
Assert.assertTrue(match);
}
}

0 comments on commit be39341

Please sign in to comment.