[arvados] updated: 2.7.0-6267-gc1eab853fc
git repository hosting
git at public.arvados.org
Tue Apr 30 17:32:34 UTC 2024
Summary of changes:
lib/crunchrun/copier_test.go | 10 ++++++++++
1 file changed, 10 insertions(+)
via c1eab853fcda31c546b36d66ca7272ac48ac0756 (commit)
from bb996d3744097bc0d0475ece4530c06b3c2582cf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit c1eab853fcda31c546b36d66ca7272ac48ac0756
Author: Tom Clegg <tom at curii.com>
Date: Tue Apr 30 13:32:02 2024 -0400
12430: Add more glob unit test cases.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/crunchrun/copier_test.go b/lib/crunchrun/copier_test.go
index 9deba783b2..486bf6fa63 100644
--- a/lib/crunchrun/copier_test.go
+++ b/lib/crunchrun/copier_test.go
@@ -223,6 +223,10 @@ func (s *copierSuite) TestMatchGlobs(c *check.C) {
c.Check(s.cp.matchGlobs("food", true), check.Equals, true)
c.Check(s.cp.matchGlobs("foo", false), check.Equals, false)
c.Check(s.cp.matchGlobs("food", false), check.Equals, false)
+ c.Check(s.cp.matchGlobs("foo/bar", false), check.Equals, true)
+ c.Check(s.cp.matchGlobs("food/bar", false), check.Equals, true)
+ c.Check(s.cp.matchGlobs("foo/bar", true), check.Equals, true)
+ c.Check(s.cp.matchGlobs("food/bar", true), check.Equals, true)
s.cp.globs = []string{"ba[!/]/foo*/**"}
c.Check(s.cp.matchGlobs("bar/foo", true), check.Equals, true)
@@ -243,6 +247,12 @@ func (s *copierSuite) TestMatchGlobs(c *check.C) {
c.Check(s.cp.matchGlobs("waz/quux/food/foo", true), check.Equals, true)
c.Check(s.cp.matchGlobs("waz/quux/foo/foo", false), check.Equals, true)
c.Check(s.cp.matchGlobs("waz/quux/food/foo", false), check.Equals, true)
+
+ s.cp.globs = []string{"foo/**/*"}
+ c.Check(s.cp.matchGlobs("foo", false), check.Equals, false)
+ c.Check(s.cp.matchGlobs("foo/bar", false), check.Equals, true)
+ c.Check(s.cp.matchGlobs("foo/bar/baz", false), check.Equals, true)
+ c.Check(s.cp.matchGlobs("foo/bar/baz/waz", false), check.Equals, true)
}
func (s *copierSuite) TestSubtreeCouldMatch(c *check.C) {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list