Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear temporary directory #78

Merged
merged 1 commit into from
Apr 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/zlib/test_zlib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,8 @@ def test_path_tmpfile
gz.write "hi"
gz.close

File.open(Dir.mktmpdir, File::RDWR | File::TMPFILE) do |io|
tmpdir = Dir.mktmpdir("zlib_file_tmpfile")
File.open(tmpdir, File::RDWR | File::TMPFILE) do |io|
io.write sio.string
io.rewind

Expand All @@ -825,6 +826,8 @@ def test_path_tmpfile
omit 'O_TMPFILE not supported (EISDIR)'
rescue Errno::EOPNOTSUPP
omit 'O_TMPFILE not supported (EOPNOTSUPP)'
ensure
Dir.rmdir(tmpdir) if tmpdir
end
end
end
Expand Down