Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jul 24, 2024
1 parent ccf952d commit bc2db2e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ mktempdir() do dir
@test Base.isfile_casesensitive(true_filename)
@test !Base.isfile_casesensitive(lowered_filename)

# check that case-sensitivity is preserved for relative paths with ghost directories:
@test Base.isfile_casesensitive(joinpath("nonexistent", "..", true_filename))
@test !Base.isfile_casesensitive(joinpath("nonexistent", "..", lowered_filename))

# check that case-sensitivity is preserved for relative paths with real directories:
mkdir("realdir")
@test Base.isfile_casesensitive(joinpath("realdir", "..", true_filename))
@test !Base.isfile_casesensitive(joinpath("realdir", "..", lowered_filename))

# check that case-sensitivity only applies to basename of a path:
if isfile(lowered_filename) # case-insensitive filesystem
mkdir("cAsEtEsT")
Expand Down

0 comments on commit bc2db2e

Please sign in to comment.