summaryrefslogtreecommitdiff
path: root/tests/glob.scm
diff options
context:
space:
mode:
authorGiacomo Leidi <goodoldpaul@autistici.org>2020-05-12 23:31:30 +0200
committerGuix Patches Tester <>2020-05-12 22:34:09 +0100
commitb4d68d22aad1ed255a113a7294b278c9d3f63d34 (patch)
tree7e42753f426e9d9420a49d051c36ec67b33487a6 /tests/glob.scm
parenta1891cbffb9909d4a74faf242f28f0f2e998eb2f (diff)
downloadguix-patches-b4d68d22aad1ed255a113a7294b278c9d3f63d34.tar
guix-patches-b4d68d22aad1ed255a113a7294b278c9d3f63d34.tar.gz
guix: Add globstar support.
* guix/glob.scm (string->sglob) (glob-match?): Add globstar support. * tests/glob.scm: Update accordingly.
Diffstat (limited to 'tests/glob.scm')
-rw-r--r--tests/glob.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/glob.scm b/tests/glob.scm
index 3134069789..2a5a40c3c6 100644
--- a/tests/glob.scm
+++ b/tests/glob.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -53,7 +54,8 @@
"foo[abc]bar" => '("foo" (set #\a #\b #\c) "bar")
"foo[a[b]c]bar" => '("foo" (set #\a #\[ #\b #\] #\c) "bar")
"[123]x" => '((set #\1 #\2 #\3) "x")
- "[a-z]" => '((range #\a #\z)))
+ "[a-z]" => '((range #\a #\z))
+ "**/*.scm" => '(**/ * ".scm"))
(test-glob-match
("foo" matches "foo" (and not "foobar" "barfoo"))
@@ -64,6 +66,8 @@
("ab[0-9]c" matches "ab0c" "ab7c" "ab9c"
(and not "ab-c" "ab00c" "ab3"))
("ab[cdefg]" matches "abc" "abd" "abg"
- (and not "abh" "abcd" "ab[")))
+ (and not "abh" "abcd" "ab["))
+ ("foo/**/*.scm" matches "foo/bar/baz.scm" "foo/bar.scm" "foo/bar/baz/zab.scm"
+ (and not "foo/bar/baz.java" "foo/bar.smc")))
(test-end "glob")