File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 36
36
mktempdir () do dir
37
37
touch (joinpath (dir, " afile.txt" ))
38
38
mkdir (joinpath (dir, " adir" ))
39
+ touch (joinpath (dir, " adir" , " bfile.txt" ))
39
40
@test length (readdir (dir)) == 2
40
41
@test readdir (dir) == map (e-> e. name, readdir (DirEntry, dir))
41
42
@test readdir (DirEntry, dir) == readdir (DirEntry (dir))
43
+ for p in readdir (dir, join= true )
44
+ if isdir (p)
45
+ @test only (readdir (p)) == " bfile.txt"
46
+ else
47
+ @test isfile (p)
48
+ @test p == joinpath (dir, " afile.txt" )
49
+ end
50
+ end
51
+ for e in readdir (DirEntry, dir)
52
+ if isdir (e) || continue
53
+ @test only (readdir (e)). name == " bfile.txt"
54
+ @test only (readdir (DirEntry, e)). name == " bfile.txt"
55
+ else
56
+ @test isfile (e)
57
+ @test e. name == " afile.txt"
58
+ end
59
+ end
42
60
end
43
61
end
44
62
You can’t perform that action at this time.
0 commit comments