Skip to content

Commit

Permalink
reverting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nlw0 committed Apr 13, 2022
1 parent 633438e commit db4f1b8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions test/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1580,39 +1580,29 @@ end
end

@testset "readdir tests" begin
(a, b) = sort(collect(a)) == sort(collect(b))
(a, b) = sort(a) == sort(b)
mktempdir() do dir
d = cd(pwd, dir) # might resolve symlinks
@test isempty(readdir(d))
@test isempty(readdir(d, join=true))
cd(d) do
@test isempty(readdir())
@test isempty(readdir(join=true))
@test isempty(readdir(join=true, lazy=true))
end
touch(joinpath(d, "file"))
mkdir(joinpath(d, "dir"))
names = ["dir", "file"]
namestypes = [("dir",:dir), ("file",:file)]
paths = [joinpath(d, x) for x in names]
@test readdir(d) names
@test readdir(d, join=true) paths
@test readdir(d, filetypes=true) namestypes
@test readdir(d, lazy=true) names
@test readdir(d, lazy=true, join=true) paths
@test readdir(d, lazy=true, filetypes=true, join=true) namestypes
cd(d) do
@test readdir() names
@test readdir(join=true) paths
@test readdir(lazy=true) names
@test readdir(lazy=true, join=true) paths
end
t, b = splitdir(d)
cd(t) do
@test readdir(b) names
@test readdir(b, join=true) [joinpath(b, x) for x in names]
@test readdir(b, lazy=true) names
@test readdir(b, lazy=true, join=true) [joinpath(b, x) for x in names]
end
end
if !Sys.iswindows()
Expand Down

0 comments on commit db4f1b8

Please sign in to comment.