Polish contribution
See gh-23297
This commit is contained in:
@@ -130,7 +130,10 @@ public class AntPathMatcherTests {
|
||||
assertThat(pathMatcher.match("", "")).isTrue();
|
||||
|
||||
assertThat(pathMatcher.match("/{bla}.*", "/testing.html")).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void matchWithNullPath() {
|
||||
assertThat(pathMatcher.match("/test", null)).isFalse();
|
||||
assertThat(pathMatcher.match("/", null)).isFalse();
|
||||
assertThat(pathMatcher.match("/", null)).isFalse();
|
||||
@@ -146,7 +149,7 @@ public class AntPathMatcherTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void withMatchStart() {
|
||||
public void matchStart() {
|
||||
// test exact matching
|
||||
assertThat(pathMatcher.matchStart("test", "test")).isTrue();
|
||||
assertThat(pathMatcher.matchStart("/test", "/test")).isTrue();
|
||||
@@ -691,8 +694,13 @@ public class AntPathMatcherTests {
|
||||
assertThat(pathMatcher.isPattern("/test/**/name")).isTrue();
|
||||
assertThat(pathMatcher.isPattern("/test?")).isTrue();
|
||||
assertThat(pathMatcher.isPattern("/test/{name}")).isTrue();
|
||||
|
||||
assertThat(pathMatcher.isPattern("/test/name")).isFalse();
|
||||
assertThat(pathMatcher.isPattern("/test/foo{bar")).isFalse();
|
||||
}
|
||||
|
||||
@Test // gh-23297
|
||||
public void isPatternWithNullPath() {
|
||||
assertThat(pathMatcher.isPattern(null)).isFalse();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user