Skip to content

Commit

Permalink
rm tempdir after test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Nov 10, 2016
1 parent 56183f2 commit 9db40bd
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,27 @@ thefname = "the fname!//\\&\1*"
@test @__DIR__() == dirname(@__FILE__)

# Issue #5789 and PR #13542:
cd(mktempdir()) do
let true_filename = "cAsEtEsT.jl", lowered_filename="casetest.jl"
touch(true_filename)
@test Base.isfile_casesensitive(true_filename)
@test !Base.isfile_casesensitive(lowered_filename)

# check that case-sensitivity only applies to basename of a path:
if isfile(lowered_filename) # case-insensitive filesystem
mkdir("cAsEtEsT")
touch(joinpath("cAsEtEsT", true_filename))
@test Base.isfile_casesensitive(joinpath("casetest", true_filename))
@test !Base.isfile_casesensitive(joinpath("casetest", lowered_filename))
mktempdir() do dir
cd(dir) do
let true_filename = "cAsEtEsT.jl", lowered_filename="casetest.jl"
touch(true_filename)
@test Base.isfile_casesensitive(true_filename)
@test !Base.isfile_casesensitive(lowered_filename)

# check that case-sensitivity only applies to basename of a path:
if isfile(lowered_filename) # case-insensitive filesystem
mkdir("cAsEtEsT")
touch(joinpath("cAsEtEsT", true_filename))
@test Base.isfile_casesensitive(joinpath("casetest", true_filename))
@test !Base.isfile_casesensitive(joinpath("casetest", lowered_filename))
end
end
end

# Test Unicode normalization; pertinent for OS X
let nfc_name = "\U00F4.jl"
touch(nfc_name)
@test Base.isfile_casesensitive(nfc_name)
# Test Unicode normalization; pertinent for OS X
let nfc_name = "\U00F4.jl"
touch(nfc_name)
@test Base.isfile_casesensitive(nfc_name)
end
end
end

Expand Down

0 comments on commit 9db40bd

Please sign in to comment.