mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-13 14:53:34 +00:00
Properly close the temporary files in io tests
This commit is contained in:
@@ -593,7 +593,8 @@ test_os2_file_stream :: proc(t: ^testing.T) {
|
||||
if !testing.expectf(t, open_err == nil, "error on opening %q: %v", TEMPORARY_FILENAME, open_err) {
|
||||
return
|
||||
}
|
||||
|
||||
defer testing.expect_value(t, os2.close(fd), nil)
|
||||
|
||||
stream := os2.to_stream(fd)
|
||||
|
||||
bytes_written, write_err := io.write(stream, buf[:])
|
||||
@@ -693,7 +694,8 @@ test_bufio_buffered_read_writer :: proc(t: ^testing.T) {
|
||||
if !testing.expectf(t, open_err == nil, "error on opening %q: %v", TEMPORARY_FILENAME, open_err) {
|
||||
return
|
||||
}
|
||||
|
||||
defer testing.expect_value(t, os2.close(fd), nil)
|
||||
|
||||
stream := os2.to_stream(fd)
|
||||
|
||||
bytes_written, write_err := io.write(stream, buf[:])
|
||||
|
||||
Reference in New Issue
Block a user