We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
file
"tempname with parent"
TMPDIR
1 parent cda0ea3 commit a873f7dCopy full SHA for a873f7d
test/file.jl
@@ -91,13 +91,15 @@ using Random
91
end
92
93
@testset "tempname with parent" begin
94
- t = tempname()
95
- @test dirname(t) == tempdir()
96
- mktempdir() do d
97
- t = tempname(d)
98
- @test dirname(t) == d
+ withenv("TMPDIR" => nothing) do
+ t = tempname()
+ @test dirname(t) == tempdir()
+ mktempdir() do d
+ t = tempname(d)
99
+ @test dirname(t) == d
100
+ end
101
+ @test_throws ArgumentError tempname(randstring())
102
- @test_throws ArgumentError tempname(randstring())
103
104
105
child_eval(code::String) = eval(Meta.parse(readchomp(`$(Base.julia_cmd()) -E $code`)))
0 commit comments