1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2022-03-03 14:43:14 +01:00
parent 1dc6bed0ca
commit 3b21818db1
16 changed files with 213 additions and 72 deletions

View file

@ -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