Skip to content

Commit

Permalink
rm tempfile
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Jul 3, 2023
1 parent 41ea3d8 commit 46d01ae
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions test/strings/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,18 @@ end
@test String(take!(buf)) == "aaazaabbbzzz"
end
let tempfile = tempname()
open(tempfile, "w") do f
replace(f, "aaa", 'a' => 'z', count=0)
replace(f, "aaa", 'a' => 'z', count=1)
replace(f, "bbb", 'a' => 'z')
replace(f, "aaa", 'a' => 'z')
print(f, "\n")
try
open(tempfile, "w") do f
replace(f, "aaa", 'a' => 'z', count=0)
replace(f, "aaa", 'a' => 'z', count=1)
replace(f, "bbb", 'a' => 'z')
replace(f, "aaa", 'a' => 'z')
print(f, "\n")
end
@test read(tempfile, String) == "aaazaabbbzzz\n"
finally
rm(tempfile, force=true)
end
@test read(tempfile, String) == "aaazaabbbzzz\n"
end
end

Expand Down

0 comments on commit 46d01ae

Please sign in to comment.