aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/com/notnite/gloppers/GlobUtilTest.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/test/java/com/notnite/gloppers/GlobUtilTest.java b/src/test/java/com/notnite/gloppers/GlobUtilTest.java
index 064ced1..1ceed6a 100644
--- a/src/test/java/com/notnite/gloppers/GlobUtilTest.java
+++ b/src/test/java/com/notnite/gloppers/GlobUtilTest.java
@@ -6,6 +6,17 @@ import static org.junit.jupiter.api.Assertions.*;
class GlobUtilTest {
@Test
+ public void multiGlobPattern() {
+ assertTrue(GlobUtil.matchGlobSequence("test", "test,foo"));
+ assertTrue(GlobUtil.matchGlobSequence("foo", "test,foo"));
+ assertTrue(GlobUtil.matchGlobSequence("foo", "foo"));
+ assertTrue(GlobUtil.matchGlobSequence("foo", "test,f*"));
+ assertTrue(GlobUtil.matchGlobSequence("foo", "*o,f*"));
+ assertFalse(GlobUtil.matchGlobSequence("baa", "*o,f*"));
+ }
+
+
+ @Test
public void testGlobBeginning() {
assertTrue(GlobUtil.matchGlob("test_id", "*_id"));
assertTrue(GlobUtil.matchGlob("test__id", "*_id"));
@@ -28,7 +39,7 @@ class GlobUtilTest {
}
@Test
- public void testSinglePlaceholder() {
+ public void testSingleGlobPlaceholder() {
assertTrue(GlobUtil.matchGlob("test_id", "tes?_i?"));
}
}