diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_signal.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb index 63d6d9d9f0..3a89240f44 100644 --- a/test/ruby/test_signal.rb +++ b/test/ruby/test_signal.rb @@ -260,4 +260,17 @@ EOS end end end + + def test_trap_puts + assert_in_out_err([], <<-INPUT, ["a"*10000], []) + Signal.trap(:INT) { + # for enable internal io mutex + sync = false + # larger than internal io buffer + print "a"*10000 + } + Process.kill :INT, $$ + sleep 0.1 + INPUT + end end |