mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-29 18:53:58 +00:00
Add an attempted reproduction for #5531.
This commit is contained in:
@@ -34,4 +34,19 @@ proc main() {.async.} =
|
||||
doAssert data == "foot\ntest2"
|
||||
file.close()
|
||||
|
||||
# Issue #5531
|
||||
block:
|
||||
removeFile(fn)
|
||||
var file = openAsync(fn, fmWrite)
|
||||
await file.write("test2")
|
||||
file.close()
|
||||
file = openAsync(fn, fmWrite)
|
||||
await file.write("test3")
|
||||
file.close()
|
||||
file = openAsync(fn, fmRead)
|
||||
let data = await file.readAll()
|
||||
doAssert data == "test3"
|
||||
file.close()
|
||||
|
||||
|
||||
waitFor main()
|
||||
|
||||
Reference in New Issue
Block a user