From 394eca4cb318cfd45a4c762751f94891b46e725f Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Fri, 24 Jan 2020 12:08:58 -0800 Subject: [PATCH 1/3] Move `realpath()` earlier in `cmdlineargs` test --- test/cmdlineargs.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 2d60b2ada1d6c..93e894774075d 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -416,6 +416,9 @@ let exename = `$(Base.julia_cmd()) --startup-file=no` # test the program name remains constant mktempdir() do dir + # dir can be case-incorrect sometimes + dir = realpath(dir) + a = joinpath(dir, "a.jl") b = joinpath(dir, "b.jl") c = joinpath(dir, ".julia", "config", "startup.jl") @@ -439,19 +442,19 @@ let exename = `$(Base.julia_cmd()) --startup-file=no` [a, a, b, a] @test readsplit(`$exename -L $b -e 'exit(0)'`) == - [realpath(b), ""] + [b, ""] @test readsplit(`$exename -L $b $a`) == - [realpath(b), a, + [b, a, a, a, b, a] @test readsplit(`$exename --startup-file=yes -e 'exit(0)'`) == [c, ""] @test readsplit(`$exename --startup-file=yes -L $b -e 'exit(0)'`) == [c, "", - realpath(b), ""] + b, ""] @test readsplit(`$exename --startup-file=yes -L $b $a`) == [c, a, - realpath(b), a, + b, a, a, a, b, a] end From f8fdf236cbc01d32fbbd24594d5f421dab96dc76 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Fri, 24 Jan 2020 15:37:18 -0800 Subject: [PATCH 2/3] Fix libgit2 tests as well --- stdlib/LibGit2/test/libgit2.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/LibGit2/test/libgit2.jl b/stdlib/LibGit2/test/libgit2.jl index 4f0de2131fc5e..0b3d61c9fe1e7 100644 --- a/stdlib/LibGit2/test/libgit2.jl +++ b/stdlib/LibGit2/test/libgit2.jl @@ -600,6 +600,7 @@ end end mktempdir() do dir + dir = realpath(dir) # test parameters repo_url = "https://github.com/JuliaLang/Example.jl" cache_repo = joinpath(dir, "Example") From a0d7eb7405f80922eaf4418e9e3aaacb0699d6d1 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Fri, 24 Jan 2020 15:38:29 -0800 Subject: [PATCH 3/3] Try fixing REPL as well --- stdlib/REPL/test/replcompletions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/REPL/test/replcompletions.jl b/stdlib/REPL/test/replcompletions.jl index 5253ce412fd1f..e79fce2c76d1e 100644 --- a/stdlib/REPL/test/replcompletions.jl +++ b/stdlib/REPL/test/replcompletions.jl @@ -804,7 +804,7 @@ end if Sys.iswindows() tmp = tempname() touch(tmp) - path = dirname(tmp) + path = realpath(dirname(tmp)) file = basename(tmp) temp_name = basename(path) cd(path) do