Fix path-replace-suffix' and
path-add-suffix' on path for some system
This commit is contained in:
parent
7e42ee2003
commit
d9f0d52c8a
|
@ -16,10 +16,18 @@
|
|||
(test (string->path "x.zo") path-replace-suffix "x.rkt" #".zo")
|
||||
(test (string->path "x.zo") path-replace-suffix "x" #".zo")
|
||||
(test (string->path "x.o.zo") path-replace-suffix "x.o.rkt" #".zo")
|
||||
(test (string->some-system-path "p/x.zo" 'unix)
|
||||
path-replace-suffix (string->some-system-path "p/x.rkt" 'unix) ".zo")
|
||||
(test (string->some-system-path "p/x.zo" 'windows)
|
||||
path-replace-suffix (string->some-system-path "p/x.rkt" 'windows) ".zo")
|
||||
(test (string->path "x_rkt.zo") path-add-suffix "x.rkt" ".zo")
|
||||
(test (string->path "x_rkt.zo") path-add-suffix "x.rkt" #".zo")
|
||||
(test (string->path "x.zo") path-add-suffix "x" #".zo")
|
||||
(test (string->path "x.o_rkt.zo") path-add-suffix "x.o.rkt" #".zo")
|
||||
(test (string->some-system-path "p/x.zo" 'unix)
|
||||
path-add-suffix (string->some-system-path "p/x" 'unix) ".zo")
|
||||
(test (string->some-system-path "p/x.zo" 'windows)
|
||||
path-add-suffix (string->some-system-path "p/x" 'windows) ".zo")
|
||||
|
||||
(define (make-/tf p exn?)
|
||||
(lambda args
|
||||
|
|
|
@ -734,7 +734,7 @@
|
|||
28,248,22,151,7,23,212,2,249,22,166,8,23,213,1,8,63,23,211,1,28,
|
||||
248,22,159,15,23,207,2,248,22,160,15,23,207,1,86,94,23,206,1,247,22,
|
||||
161,15,253,2,158,2,23,203,1,23,207,1,23,208,1,23,209,1,23,210,1,
|
||||
23,199,1,2,28,248,22,158,15,23,196,2,249,22,176,15,23,197,1,23,195,
|
||||
23,199,1,2,28,248,22,159,15,23,196,2,249,22,176,15,23,197,1,23,195,
|
||||
1,192,32,161,2,88,148,36,40,57,11,2,50,222,33,162,2,28,248,22,133,
|
||||
4,23,197,2,86,94,23,196,1,19,248,22,145,8,23,195,2,35,248,22,145,
|
||||
8,23,196,2,249,22,168,15,251,22,152,8,250,22,151,8,23,204,1,36,23,
|
||||
|
@ -763,7 +763,7 @@
|
|||
39,11,89,146,39,36,11,248,22,179,15,23,199,2,86,94,23,195,1,86,94,
|
||||
28,192,12,250,22,179,11,2,36,2,69,23,201,2,249,22,7,194,195,27,248,
|
||||
22,164,15,23,196,1,27,251,2,161,2,23,198,2,23,201,1,23,202,1,248,
|
||||
22,145,8,23,199,1,28,248,22,158,15,23,196,2,249,22,176,15,23,197,1,
|
||||
22,145,8,23,199,1,28,248,22,159,15,23,196,2,249,22,176,15,23,197,1,
|
||||
23,195,1,192,2,51,252,80,143,41,8,33,2,36,2,51,32,0,88,148,8,
|
||||
36,38,43,11,9,222,33,164,2,198,199,32,166,2,88,148,36,40,57,11,2,
|
||||
50,222,33,167,2,28,248,22,133,4,23,197,2,86,94,23,196,1,19,248,22,
|
||||
|
@ -795,7 +795,7 @@
|
|||
144,39,11,89,146,39,36,11,248,22,179,15,23,199,2,86,94,23,195,1,86,
|
||||
94,28,192,12,250,22,179,11,2,36,2,69,23,201,2,249,22,7,194,195,27,
|
||||
248,22,164,15,23,196,1,27,251,2,166,2,23,198,2,23,201,1,23,202,1,
|
||||
248,22,145,8,23,199,1,28,248,22,158,15,23,196,2,249,22,176,15,23,197,
|
||||
248,22,145,8,23,199,1,28,248,22,159,15,23,196,2,249,22,176,15,23,197,
|
||||
1,23,195,1,192,252,80,143,41,8,33,2,36,2,70,22,151,8,198,199,249,
|
||||
247,22,175,5,23,195,1,11,249,247,22,175,5,194,11,28,248,22,88,23,195,
|
||||
2,9,27,27,248,22,81,23,197,2,28,248,22,183,15,23,194,2,248,22,186,
|
||||
|
|
|
@ -767,7 +767,7 @@
|
|||
"(finish i sep(add1 i))"
|
||||
"(loop i)))))))"
|
||||
"(loop(bytes-length bs)))))"
|
||||
"(if(path? base)"
|
||||
"(if(path-for-some-system? base)"
|
||||
"(build-path base new-name)"
|
||||
" new-name)))))"
|
||||
"(define-values(path-replace-suffix)"
|
||||
|
|
|
@ -899,7 +899,7 @@
|
|||
(finish i sep (add1 i))
|
||||
(loop i)))))])
|
||||
(loop (bytes-length bs)))])
|
||||
(if (path? base)
|
||||
(if (path-for-some-system? base)
|
||||
(build-path base new-name)
|
||||
new-name)))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user