Fixing path-only documentation and adding new test case
(cherry picked from commit 5417d7a5b7
)
This commit is contained in:
parent
38acb4b9a9
commit
1f383eb5c7
|
@ -556,11 +556,12 @@ path contains an embedded path for a non-existent directory,
|
||||||
or if an infinite cycle of soft links is detected.}
|
or if an infinite cycle of soft links is detected.}
|
||||||
|
|
||||||
@defproc[(path-only [path (or/c path-string? path-for-some-system?)])
|
@defproc[(path-only [path (or/c path-string? path-for-some-system?)])
|
||||||
path-for-some-system?]{
|
(or/c #f path-for-some-system?)]{
|
||||||
|
|
||||||
If @racket[path] is a filename, the file's path is returned. If
|
If @racket[path] is a filename, the file's path is returned. If
|
||||||
@racket[path] is syntactically a directory, @racket[path] is returned
|
@racket[path] is syntactically a directory, @racket[path] is returned
|
||||||
(as a path, if it was a string).}
|
(as a path, if it was a string). If @racket[path] has no directory part
|
||||||
|
@racket[#f] is returned.}
|
||||||
|
|
||||||
@defproc[(simple-form-path [path path-string?]) path?]{
|
@defproc[(simple-form-path [path path-string?]) path?]{
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
|
(rtest path-only "a" #f)
|
||||||
(rtest path-only "a/b" (string->path "a/"))
|
(rtest path-only "a/b" (string->path "a/"))
|
||||||
(rtest path-only "a/b/" (string->path "a/b/"))
|
(rtest path-only "a/b/" (string->path "a/b/"))
|
||||||
(rtest path-only "a/.." (string->path "a/.."))
|
(rtest path-only "a/.." (string->path "a/.."))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user