~ chicken-core (chicken-5) d5dbf637ea8ec8cf819852b644a2240b0c51398b
commit d5dbf637ea8ec8cf819852b644a2240b0c51398b
Author: Moritz Heidkamp <moritz@twoticketsplease.de>
AuthorDate: Sat May 25 17:31:12 2013 +0200
Commit: Peter Bex <peter.bex@xs4all.nl>
CommitDate: Tue May 28 22:17:17 2013 +0200
Make tests work from symlinked paths
The private repository path tests didn't work when run from inside a
path containing symlinks because runtests.sh didn't expand symlinks
while the -private-repository mechanism does. This lead the test
assertion which compares the two paths to fail.
Signed-off-by: Peter Bex <peter.bex@xs4all.nl>
diff --git a/tests/private-repository-test.scm b/tests/private-repository-test.scm
index 9ad524c0..6a4f5c70 100644
--- a/tests/private-repository-test.scm
+++ b/tests/private-repository-test.scm
@@ -1,10 +1,15 @@
;;;; private-repository-test.scm
-(use files)
+(use files posix)
-(define repo (normalize-pathname (repository-path)))
-(define dir (normalize-pathname (car (command-line-arguments))))
+(define read-symbolic-link*
+ (cond-expand
+ ((and windows (not cygwin)) (lambda (x) x))
+ (else read-symbolic-link)))
+
+(define repo (normalize-pathname (read-symbolic-link* (repository-path) #t)))
+(define dir (normalize-pathname (read-symbolic-link* (car (command-line-arguments)) #t)))
(print (list dir repo))
Trap