Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
musm committed Oct 5, 2019
1 parent 0735675 commit f5d9e9d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/path.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
@test joinpath(S("foo"), S(""), S("")) == "foo$(sep)"
@test joinpath(S("foo"), S(""), S(""), S("bar")) == "foo$(sep)bar"

@test joinpath(S("foo"), S(homedir())) == homedir()
@test joinpath(S(abspath("foo")), S(homedir())) == homedir()

if Sys.iswindows()
@test joinpath(S("foo"),S("bar:baz")) == "bar:baz"
@test joinpath(S("C:"),S("foo"),S("D:"),S("bar")) == "D:bar"
Expand All @@ -48,12 +51,12 @@
@test joinpath(S("C:\\a\\b"), S("c:c\\e")) == "c:\\a\\b\\c\\e"

# UNC paths
@test _joinpath(S("\\\\server"), S("share")) == "\\\\server\\share"
@test _joinpath(S("\\\\server"), S("share"), S("a")) == "\\\\server\\share\\a"
@test _joinpath(S("\\\\server\\"), S("share"), S("a")) == "\\\\server\\share\\a"
@test _joinpath(S("\\\\server"), S("share"), S("a"), S("b")) == "\\\\server\\share\\a\\b"
@test _joinpath(S("\\\\server\\share"),S("a")) == "\\\\server\\share\\a"
@test _joinpath(S("\\\\server\\share\\"), S("a")) == "\\\\server\\share\\a"
@test joinpath(S("\\\\server"), S("share")) == "\\\\server\\share"
@test joinpath(S("\\\\server"), S("share"), S("a")) == "\\\\server\\share\\a"
@test joinpath(S("\\\\server\\"), S("share"), S("a")) == "\\\\server\\share\\a"
@test joinpath(S("\\\\server"), S("share"), S("a"), S("b")) == "\\\\server\\share\\a\\b"
@test joinpath(S("\\\\server\\share"),S("a")) == "\\\\server\\share\\a"
@test joinpath(S("\\\\server\\share\\"), S("a")) == "\\\\server\\share\\a"

elseif Sys.isunix()
@test joinpath(S("foo"),S("bar:baz")) == "foo$(sep)bar:baz"
Expand Down

0 comments on commit f5d9e9d

Please sign in to comment.