mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/thread/test_thread.rb (test_local_barrier), test/thread/lbtest.rb: test for [ruby-dev:30653].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
416695adff
commit
e3624857f6
2 changed files with 65 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
# -*- ruby-indent-level: 4 -*-
|
||||
require 'thread'
|
||||
require 'test/unit'
|
||||
|
||||
|
@ -63,5 +64,18 @@ class TC_Thread < Test::Unit::TestCase
|
|||
assert_raises(Interrupt) { thread.value }
|
||||
assert(locked)
|
||||
end
|
||||
|
||||
def test_local_barrier
|
||||
dir = File.dirname(__FILE__)
|
||||
lbtest = File.join(dir, "lbtest.rb")
|
||||
$:.unshift File.join(File.dirname(dir), 'ruby')
|
||||
require 'envutil'
|
||||
$:.shift
|
||||
10.times {
|
||||
result = `#{EnvUtil.rubybin} #{lbtest}`
|
||||
assert(!$?.coredump?, '[ruby-dev:30653]')
|
||||
assert_equal("exit.", result[/.*\Z/], '[ruby-dev:30653]')
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue