Do not leave test file
Run this test separately because something seems remained unreleased on Windows.
This commit is contained in:
parent
b4efa4b700
commit
2cdbeb29e6
@ -519,12 +519,14 @@ class TestIOBuffer < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_private
|
def test_private
|
||||||
tmpdir = Dir.tmpdir
|
Tempfile.create(%w"buffer .txt") do |file|
|
||||||
buffer_path = File.join(tmpdir, "buffer.txt")
|
file.write("Hello World")
|
||||||
File.write(buffer_path, "Hello World")
|
file.close
|
||||||
|
assert_separately(["-W0", "-", file.path], "#{<<-"begin;"}\n#{<<-'end;'}")
|
||||||
File.open(buffer_path) do |file|
|
begin;
|
||||||
|
file = File.open(ARGV[0], "r+")
|
||||||
buffer = IO::Buffer.map(file, nil, 0, IO::Buffer::PRIVATE)
|
buffer = IO::Buffer.map(file, nil, 0, IO::Buffer::PRIVATE)
|
||||||
|
begin
|
||||||
assert buffer.private?
|
assert buffer.private?
|
||||||
refute buffer.readonly?
|
refute buffer.readonly?
|
||||||
|
|
||||||
@ -536,5 +538,7 @@ class TestIOBuffer < Test::Unit::TestCase
|
|||||||
ensure
|
ensure
|
||||||
buffer&.free
|
buffer&.free
|
||||||
end
|
end
|
||||||
|
end;
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user