fix bug in GlobUtil

This commit is contained in:
Sebastian Sdorra
2011-10-19 08:12:29 +02:00
parent 9556726093
commit 061483d56a
2 changed files with 8 additions and 8 deletions

View File

@@ -66,11 +66,11 @@ public class GlobUtilTest
@Test
public void matchesTest()
{
assertTrue(GlobUtil.matches("/test/path/somefile.txt", "/test/path/*"));
assertTrue(GlobUtil.matches("/test/path/somefile.txt", "*/somefile.txt"));
assertTrue(GlobUtil.matches("asd", "a*d"));
assertTrue(GlobUtil.matches("asd", "a?d"));
assertFalse(GlobUtil.matches("asd", "a\\*d"));
assertFalse(GlobUtil.matches("asd", "a\\?d"));
assertTrue(GlobUtil.matches("/test/path/*", "/test/path/somefile.txt"));
assertTrue(GlobUtil.matches("*/somefile.txt", "/test/path/somefile.txt"));
assertTrue(GlobUtil.matches("a*d", "asd"));
assertTrue(GlobUtil.matches("a?d", "asd"));
assertFalse(GlobUtil.matches("a\\*d", "asd"));
assertFalse(GlobUtil.matches("a\\?d", "asd"));
}
}