forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loading.jl
32 lines (26 loc) · 1004 Bytes
/
loading.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# This file is a part of Julia. License is MIT: https://julialang.org/license
using Base.Test
@test @__LINE__ == 5
include("test_sourcepath.jl")
thefname = "the fname!//\\&\1*"
@test include_string("include_string_test() = @__FILE__", thefname)() == Base.source_path()
@test include_string("Base.source_path()", thefname) == Base.source_path()
@test basename(@__FILE__) == "loading.jl"
@test isabspath(@__FILE__)
# Issue #5789 and PR #13542:
let true_filename = "cAsEtEsT.jl", lowered_filename="casetest.jl"
touch(true_filename)
@test Base.isfile_casesensitive(true_filename)
@test !Base.isfile_casesensitive(lowered_filename)
rm(true_filename)
end
# Test Unicode normalization; pertinent for OS X
let nfc_name = "\U00F4.jl"
touch(nfc_name)
@test Base.isfile_casesensitive(nfc_name)
rm(nfc_name)
end
let paddedname = "Ztest_sourcepath.jl"
filename = SubString(paddedname, 2, length(paddedname))
@test Base.find_in_path(filename) == abspath(paddedname[2:end])
end