fix collapse-module-path for rel-to of .

svn: r2933
This commit is contained in:
Matthew Flatt 2006-05-13 15:27:21 +00:00
parent 22be82f603
commit b04da77a20
2 changed files with 5 additions and 1 deletions

View File

@ -343,7 +343,9 @@
(ormap path? elements)))
(apply build-path
(let-values ([(base name dir?) (split-path relto-mp)])
base)
(if (eq? base 'relative)
'same
base))
(map (lambda (x) (if (bytes? x) (bytes->path x) x))
elements))]
[(string? relto-mp)

View File

@ -105,6 +105,8 @@
(test-cmp '(planet "x.ss" ("m" "z.plt" 2)) '(planet "x.ss" ("m" "z.plt" 2)) '(file "q.ss"))
(test-cmp '(planet "x.ss" ("m" "z.plt" 2)) '(planet "x.ss" ("m" "z.plt" 2)) "where/in/the/world/cs.ss")
(test-cmp "./x.ss" "x.ss" ".")
;; Try path cases that don't fit UTF-8 (and therefore would go wrong as a string):
(let ([dir (build-path (current-directory) (bytes->path #"\xFF"))])
(test-cmp (build-path dir "x.ss")