|
|
|
@ -57,6 +57,16 @@ public class PathPatternTests { |
|
|
|
assertEquals("[/][/][/]",elementsToString(toPathContainer("///").elements())); |
|
|
|
assertEquals("[/][/][/]",elementsToString(toPathContainer("///").elements())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void hasPatternSyntax() { |
|
|
|
|
|
|
|
PathPatternParser parser = new PathPatternParser(); |
|
|
|
|
|
|
|
assertTrue(parser.parse("/foo/*").hasPatternSyntax()); |
|
|
|
|
|
|
|
assertTrue(parser.parse("/foo/**/bar").hasPatternSyntax()); |
|
|
|
|
|
|
|
assertTrue(parser.parse("/f?o").hasPatternSyntax()); |
|
|
|
|
|
|
|
assertTrue(parser.parse("/foo/{bar}/baz").hasPatternSyntax()); |
|
|
|
|
|
|
|
assertFalse(parser.parse("/foo/bar").hasPatternSyntax()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void matching_LiteralPathElement() { |
|
|
|
public void matching_LiteralPathElement() { |
|
|
|
checkMatches("foo", "foo"); |
|
|
|
checkMatches("foo", "foo"); |
|
|
|
|