diff --git a/test/file.jl b/test/file.jl index 9b19c86e85ce48..8b4dbe8018aec1 100644 --- a/test/file.jl +++ b/test/file.jl @@ -1911,10 +1911,12 @@ end @testset "pwd tests" begin mktempdir() do dir cd(dir) do + io = IOBuffer() + Base.repl_cmd(@cmd("cd"), io) + Base.repl_cmd(@cmd("cd -"), io) @test pwd() == dir rm(dir) @test_throws Base._UVError("pwd()", Base.UV_ENOENT) pwd() - io = IOBuffer() # pwd() throwing was causing this to error Base.repl_cmd(@cmd("cd ~"), io) end