Skip to content

Commit

Permalink
rm tempfile
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored and giordano committed Jun 22, 2023
1 parent 0ec87f8 commit fa87850
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 fa87850

Please sign in to comment.