summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_require.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 4ccabf2d8c..b48de0e240 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -699,11 +699,12 @@ class TestRequire < Test::Unit::TestCase
f.close
File.unlink(f.path)
File.mkfifo(f.path)
- assert_separately(["-", f.path], <<-END, timeout: 3)
+ assert_ruby_status(["-", f.path], <<-END, timeout: 3)
th = Thread.current
Thread.start {begin sleep(0.001) end until th.stop?; th.raise(IOError)}
- assert_raise(IOError) do
+ begin
load(ARGV[0])
+ rescue IOError
end
END
}
@@ -715,7 +716,7 @@ class TestRequire < Test::Unit::TestCase
File.unlink(f.path)
File.mkfifo(f.path)
- assert_separately(["-", f.path], <<-INPUT, timeout: 3)
+ assert_ruby_status(["-", f.path], <<-INPUT, timeout: 3)
path = ARGV[0]
th = Thread.current
Thread.start {
@@ -723,12 +724,11 @@ class TestRequire < Test::Unit::TestCase
sleep(0.001)
end until th.stop?
open(path, File::WRONLY | File::NONBLOCK) {|fifo_w|
- fifo_w.puts "class C1; FOO='foo'; end"
+ fifo_w.print "__END__\n" # ensure finishing
}
}
load(path)
- assert_equal(C1::FOO, "foo")
INPUT
}
end if defined?(File.mkfifo)