diff options
Diffstat (limited to 'tests/gpgscm/tests.scm')
-rw-r--r-- | tests/gpgscm/tests.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm index 06084dea9..40ba7e394 100644 --- a/tests/gpgscm/tests.scm +++ b/tests/gpgscm/tests.scm @@ -192,6 +192,16 @@ (define (in-srcdir . names) (canonical-path (apply path-join (cons (getenv "abs_top_srcdir") names)))) +;; Split a list of paths. +(define (pathsep-split s) + (string-split s *pathsep*)) + +;; Join a list of paths. +(define (pathsep-join paths) + (foldr (lambda (a b) (string-append a (string *pathsep*) b)) + (car paths) + (cdr paths))) + ;; Try to find NAME in PATHS. Returns the full path name on success, ;; or raises an error. (define (path-expand name paths) @@ -209,7 +219,7 @@ ;; (load (with-path "library.scm")) (define (with-path name) (catch name - (path-expand name (string-split (getenv "GPGSCM_PATH") *pathsep*)))) + (path-expand name (pathsep-split (getenv "GPGSCM_PATH"))))) (define (basename path) (let ((i (string-index path #\/))) |