Fix a bug in resolve-module-path' to do an expand-user-path', which

`file' specs do too (in `require' etc).
This commit is contained in:
Eli Barzilay 2011-08-26 10:13:27 -04:00
parent 6e50ecad99
commit 2ef9f5ae0e
2 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,7 @@
[(and (or (not (pair? s)) (not (list? s))) (not (path? s)))
#f]
[(or (path? s) (eq? (car s) 'file))
(let ([p (if (path? s) s (cadr s))])
(let ([p (if (path? s) s (expand-user-path (cadr s)))])
(path-ss->rkt
(path->complete-path
p (let ([d (get-dir)])

View File

@ -63,6 +63,8 @@
(err/rt-test (resolve-module-path-index "apple.ss" #f))
(err/rt-test (resolve-module-path-index (module-path-index-join #f #f) #f) exn:fail?)
(test (expand-user-path "~/x.rkt") resolve-module-path '(file "~/x.rkt") #f)
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; collapse-module-path[-index]