diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-11 13:45:45 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-11 13:45:45 +0100 |
commit | be52a8f9c260f7953bc8b6b991c476120d8704ad (patch) | |
tree | d1d1073b322d2ae4382f75f241000ca7980516d4 /src/test/java | |
parent | 65cc87b1383f37b4b423d4beb42dfe573c1ba3ea (diff) | |
download | gloppers-bug-fixes-and-performance-improvements.tar.gz gloppers-bug-fixes-and-performance-improvements.tar.bz2 gloppers-bug-fixes-and-performance-improvements.zip |
Fix comma globsbug-fixes-and-performance-improvements
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/com/notnite/gloppers/GlobUtilTest.java | 13 |
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?")); } } |