Skip to content

Commit d3e304a

Browse files
authored
Add yet another unit test (#59)
1 parent 718fddc commit d3e304a

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CoverageTools"
22
uuid = "c36e975a-824b-4404-a568-ef97ca766997"
33
authors = ["Iain Dunning <iaindunning@gmail.com>"]
4-
version = "1.2.6"
4+
version = "1.2.7"
55

66
[compat]
77
julia = "0.7, 1"

test/runtests.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,22 @@ end # testset
241241
end
242242
end
243243

244+
@testset "CoverageTools.jl" begin
245+
@testset "clean_file" begin
246+
mktempdir() do tmp_dir
247+
cd(tmp_dir) do
248+
source_file = joinpath(tmp_dir, "foo.jl")
249+
cov_file = joinpath(tmp_dir, "foo.jl.12345.cov")
250+
touch(source_file)
251+
touch(cov_file)
252+
@test isfile(source_file)
253+
@test isfile(cov_file)
254+
CoverageTools.clean_file(source_file)
255+
@test isfile(source_file)
256+
@test !isfile(cov_file)
257+
end
258+
end
259+
end
260+
end
261+
244262
end # withenv

0 commit comments

Comments
 (0)