Closed
Description
Hello! I'm packaging julia 1.4.1 for guix, and this test is failing
Line 70 in 381693d
I can reproduce it with:
using Test
using Random
function run()
@testset "tempname with parent" begin
t = tempname()
@test dirname(t) == tempdir()
mktempdir() do d
t = tempname(d)
@test dirname(t) == d
end
@test_throws ArgumentError tempname(randstring())
end
end
# tempdir() uses the first environment variable found in the ordered list TMPDIR, TMP, TEMP, and TEMPDIR. If none of these are found, the path "/tmp" is used.
# Let's check all those variables are currently empty
all_empty() = @test all(isnothing.(get.(Ref(ENV), ["TMPDIR", "TMP", "TEMP", "TEMPDIR"], nothing)))
all_empty()
# Check the test passes when no "TEMP" variable is set
@info "No env var"
run()
@info "TMPDIR var"
withenv("TMPDIR" => mktempdir()) do
run()
end
all_empty()
Can anybody confirm the same happens with the official build?
Thanks, Nicolò