summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorshirosaki <shirosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-28 00:51:40 +0000
committershirosaki <shirosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-28 00:51:40 +0000
commitbb65920642330cb375b3649496dca95e27aee04b (patch)
tree6c13c993e314328374780e68bcfc55d67d69eaac /test
parent494fd237f00f166cf024a51fd04e064fc94e0f82 (diff)
* test/ruby/test_thread.rb
(TestThreadGroup#test_thread_timer_and_interrupt): skip exit status assertion because we cannot get signal status on Windows. * win32/win32.c (CreateChild): create process group to receive the signal by GenerateConsoleCtrlEvent(). * win32/win32.c (kill): use CTRL_BREAK_EVENT instead of CTRL_C_EVENT if a process group is specified. CTRL_C_EVENT signal cannot be generated for process groups for the specification. [ruby-dev:45149] [Bug #5812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_thread.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 0931de5659..6f7d1280bd 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -694,9 +694,14 @@ class TestThreadGroup < Test::Unit::TestCase
Process.kill(:SIGINT, pid)
Process.wait(pid)
s = $?
- assert_equal([false, true, false],
- [s.exited?, s.signaled?, s.stopped?],
- "[s.exited?, s.signaled?, s.stopped?]")
+ if /mswin|mingw/ =~ RUBY_PLATFORM
+ # status of signal is not supported on Windows
+ assert_equal(pid, s.pid)
+ else
+ assert_equal([false, true, false],
+ [s.exited?, s.signaled?, s.stopped?],
+ "[s.exited?, s.signaled?, s.stopped?]")
+ end
t1 = Time.now.to_f
assert_in_delta(t1 - t0, 1, 1)
end