| @@ -22,6 +22,7 @@ import java.io.File; | |||||
| import org.junit.Test; | import org.junit.Test; | ||||
| import static org.junit.Assert.assertEquals; | import static org.junit.Assert.assertEquals; | ||||
| import static org.junit.Assert.assertFalse; | |||||
| import static org.junit.Assert.assertTrue; | import static org.junit.Assert.assertTrue; | ||||
| public class TokenizedPatternTest { | public class TokenizedPatternTest { | ||||
| @@ -61,4 +62,16 @@ public class TokenizedPatternTest { | |||||
| .withoutLastToken().matchPath(p, true)); | .withoutLastToken().matchPath(p, true)); | ||||
| } | } | ||||
| @Test | |||||
| /** | |||||
| * this test illustrates the behavior described in bugzilla 59114 | |||||
| * meaning that the pattern "**" matches the empty path | |||||
| * but the pattern "*" does not | |||||
| */ | |||||
| public void testEmptyFolderWithStarStar() { | |||||
| TokenizedPath p = TokenizedPath.EMPTY_PATH; | |||||
| assertTrue(new TokenizedPattern(SelectorUtils.DEEP_TREE_MATCH).matchPath(p, true)); | |||||
| assertFalse(new TokenizedPattern("*").matchPath(p, true)); | |||||
| } | |||||
| } | } | ||||