aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/tests.scm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/gpgscm/tests.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm
index 71ca3692a..8986a705a 100644
--- a/tests/gpgscm/tests.scm
+++ b/tests/gpgscm/tests.scm
@@ -181,9 +181,15 @@
(assert (string=? (path-join "" "bar" "baz") "bar/baz"))
(define (canonical-path path)
- (if (char=? #\/ (string-ref path 0))
+ (if (or (char=? #\/ (string-ref path 0))
+ (and *win32* (char=? #\\ (string-ref path 0)))
+ (and *win32*
+ (char-alphabetic? (string-ref path 0))
+ (char=? #\: (string-ref path 1))
+ (or (char=? #\/ (string-ref path 2))
+ (char=? #\\ (string-ref path 2)))))
path
- (string-append (getcwd) "/" path)))
+ (path-join (getcwd) path)))
(define (in-srcdir . names)
(canonical-path (apply path-join (cons (getenv "srcdir") names))))
@@ -194,7 +200,7 @@
(let loop ((path paths))
(if (null? path)
(throw "Could not find" name "in" paths)
- (let* ((qualified-name (string-append (car path) "/" name))
+ (let* ((qualified-name (path-join (car path) name))
(file-exists (call-with-input-file qualified-name
(lambda (x) #t))))
(if file-exists