Merge pull request #2 from zhuyuesut/zhuyuesut-fixbug

Update RegexSelectorTest.java
master
zhuyue 2017-05-03 18:36:21 +08:00 committed by GitHub
commit 975adf7072
1 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,8 @@ public class RegexSelectorTest {
@Test
public void testRegexWithZeroWidthAssertions() {
String regex = "^.*(?=\\?)";
String source = "hello world?xxxx";
String regex = "^.*(?=\\?)(?!\\?yy)";
String source = "hello world?xx?yy";
RegexSelector regexSelector = new RegexSelector(regex);
String select = regexSelector.select(source);
Assertions.assertThat(select).isEqualTo("hello world");