Polish contribution

See gh-23297
This commit is contained in:
Sam Brannen
2019-07-17 14:39:21 +02:00
parent 84200f3141
commit 7779aa3487
3 changed files with 17 additions and 9 deletions

View File

@@ -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();
}