aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-11 13:45:45 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-11 13:45:45 +0100
commitbe52a8f9c260f7953bc8b6b991c476120d8704ad (patch)
treed1d1073b322d2ae4382f75f241000ca7980516d4 /src/test/java
parent65cc87b1383f37b4b423d4beb42dfe573c1ba3ea (diff)
downloadgloppers-bug-fixes-and-performance-improvements.tar.gz
gloppers-bug-fixes-and-performance-improvements.tar.bz2
gloppers-bug-fixes-and-performance-improvements.zip
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?"));
}
}