Skip to content

Commit

Permalink
rm tempfile
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Jun 11, 2023
1 parent ec4334c commit 340fc97
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 340fc97

Please sign in to comment.