diff options
author | Benoit Daloze <[email protected]> | 2022-03-03 14:43:14 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2022-03-03 14:43:14 +0100 |
commit | 3b21818db1fac0c22f16364eab2d8cc0067abd63 (patch) | |
tree | 6776a6bfe92db4e35da1ff01e09c40d4c4c20351 /spec/ruby/core/exception | |
parent | 1dc6bed0ca6ca379f1c4b2e9fc0dee72dbf1e205 (diff) |
Update to ruby/spec@82cd3a3
Diffstat (limited to 'spec/ruby/core/exception')
-rw-r--r-- | spec/ruby/core/exception/interrupt_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/exception/interrupt_spec.rb b/spec/ruby/core/exception/interrupt_spec.rb index a7501efadc..299b5b81f3 100644 --- a/spec/ruby/core/exception/interrupt_spec.rb +++ b/spec/ruby/core/exception/interrupt_spec.rb @@ -48,4 +48,13 @@ describe "Interrupt" do RUBY out.should == "Interrupt: #{Signal.list["INT"]}\n" end + + platform_is_not :windows do + it "shows the backtrace and has a signaled exit status" do + err = IO.popen([*ruby_exe, '-e', 'Process.kill :INT, Process.pid; sleep'], err: [:child, :out], &:read) + $?.termsig.should == Signal.list.fetch('INT') + err.should.include? ': Interrupt' + err.should.include? "from -e:1:in `<main>'" + end + end end |