diff options
Diffstat (limited to 'spec/ruby/core/process/status/exitstatus_spec.rb')
-rw-r--r-- | spec/ruby/core/process/status/exitstatus_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/ruby/core/process/status/exitstatus_spec.rb b/spec/ruby/core/process/status/exitstatus_spec.rb index 9a0be6a08d..cd46b2081f 100644 --- a/spec/ruby/core/process/status/exitstatus_spec.rb +++ b/spec/ruby/core/process/status/exitstatus_spec.rb @@ -1,7 +1,6 @@ require_relative '../../../spec_helper' describe "Process::Status#exitstatus" do - before :each do ruby_exe("exit(42)") end @@ -10,4 +9,17 @@ describe "Process::Status#exitstatus" do $?.exitstatus.should == 42 end + describe "for a child that raised SignalException" do + before :each do + ruby_exe("raise SignalException, 'SIGTERM'") + end + + platform_is_not :windows do + # The exitstatus is not set in these cases. See the termsig_spec + # for info on where the signal number (SIGTERM) is available. + it "returns nil" do + $?.exitstatus.should == nil + end + end + end end |