1 # -*- encoding: binary -*-
6 Thread.abort_on_exception = true
8 class Test_IO_Splice_In_Full < Test::Unit::TestCase
9 def test_splice_in_full
11 tmp = Tempfile.new 'splice-read'
18 nr = IO.splice rd, nil, tmp, nil, 666, IO::Splice::WAITALL
21 assert_equal "HIHIHI" * 111, tmp.read
27 thr = Thread.new { a.read(666) }
34 nr = IO.tee rd, b, 666, IO::Splice::WAITALL
37 assert_equal "HIHIHI" * 111, thr.value
39 end if defined?(RUBY_ENGINE)