;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Ludovic Courtès ;;; Copyright © 2020 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (test-glob) #:use-module (guix glob) #:use-module (srfi srfi-64)) (test-begin "glob") (define-syntax test-string->sglob (syntax-rules (=>) ((_ pattern => result rest ...) (begin (test-equal (format #f "string->sglob, ~s" pattern) result (string->sglob pattern)) (test-string->sglob rest ...))) ((_) #t))) (define-syntax test-glob-match (syntax-rules (matches and not) ((_ (pattern-string matches strings ... (and not others ...)) rest ...) (begin (test-assert (format #f "glob-match? ~s" pattern-string) (let ((pattern (string->compiled-sglob pattern-string))) (and (glob-match? pattern strings) ... (not (glob-match? pattern others)) ...))) (test-glob-match rest ...))) ((_) #t))) (test-string->sglob "foo" => "foo" "?foo*" => '(? "foo" *) "foo[1-5]" => '("foo" (range #\1 #\5)) "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)) "**/*.scm" => '(**/ * ".scm")) (test-glob-match ("foo" matches "foo" (and not "foobar" "barfoo")) ("foo*" matches "foo" "foobar" (and not "xfoo")) ("foo??bar" matches "fooxxbar" "fooZZbar" (and not "foobar" "fooxxxbar" "fooxxbarzz")) ("foo?" matches "foox" (and not "fooxx")) ("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[")) ("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") ='/guix/log/gnu/packages/gps.scm?id=93f21e1a35eec940be754fea0303cc649eacd395&showmsg=1'>Expand)Author 2021-03-01gnu: gama: Delete bundled pdfs....* gnu/packages/gps.scm (gama)[source]: Adjust snippet to also remove generated PDFs. Efraim Flashner 2021-03-01gnu: gama: Update to 2.14....* gnu/packages/gps.scm (gama): Update to 2.14. Efraim Flashner 2021-01-17gnu: gama: Update to 2.13....* gnu/packages/gps.scm (gama): Update to 2.13. Efraim Flashner 2021-01-06gnu: gpsbabel: Enable tests....* gnu/packages/patches/gps.scm (gpsbabel)[source]: Add patch. [arguments]: Enable tests. * gnu/packages/patches/gpsbabel-fix-i686-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Efraim Flashner 2021-01-06gnu: gpsbabel: Unbundle zlib....* gnu/packages/gps.scm (gpsbabel)[source]: Adjust snippet to remove bundled zlib and references from the Makefile. Efraim Flashner 2021-01-06gnu: gpsbabel: Update to 1.7.0....* gnu/packages/gps.scm (gpsbabel): Update to 1.7.0. [source]: Use git-fetch, remove obsolete patches. [inputs]: Add libusb. * gnu/packages/patches/gpsbabel-minizip.patch: Remove file. * gnu/packages/patches/gpsbabel-qstring.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove entries. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Björn Höfling 2020-11-30gnu: gpxsee: Update to 7.37....* gnu/packages/gps.scm (gpxsee): Update to 7.37. Tobias Geerinckx-Rice 2020-11-29gnu: gama: Update to 2.12....* gnu/packages/gps.scm (gama): Update to 2.12. Efraim Flashner 2020-11-13gnu: gpxsee: Update to 7.36....* gnu/packages/gps.scm (gpxsee): Update to 7.36. Tobias Geerinckx-Rice 2020-11-05gnu: gpxsee: Update to 7.35....* gnu/packages/gps.scm (gpxsee): Update to 7.35. Tobias Geerinckx-Rice 2020-10-28gnu: gama: Remove bundled library....* gnu/packages/gps.scm (gama)[source]: Add snippet to remove bundled expat-1.1 library. Efraim Flashner 2020-10-28gnu: gama: Update to 2.11....* gnu/packages/gps.scm (gama): Update to 2.11. Efraim Flashner