diff options
author | David Kellum <dek-oss@gravitext.com> | 2017-10-17 15:59:07 -0700 |
---|---|---|
committer | David Kellum <dek-oss@gravitext.com> | 2017-10-18 11:32:35 -0700 |
commit | b10910a975e57d8688c66204ead17a5734f6e27d (patch) | |
tree | 4f91b415612cb58062338816ec6f01696cdc32d4 /spec/commands | |
parent | a0c1d73418254ba0659ff7c58da34348345fc980 (diff) | |
download | bundler-b10910a975e57d8688c66204ead17a5734f6e27d.tar.gz |
Add exec command spec test load with SignalException
(cherry picked from work tree commits: 43fa779f4 26a20e2cb 881f856c0)
Diffstat (limited to 'spec/commands')
-rw-r--r-- | spec/commands/exec_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 2c86c6ab5f..ae31487937 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -538,6 +538,26 @@ RSpec.describe "bundle exec" do end end + context "the executable exits by SignalException" do + let(:executable) do + ex = super() + ex << "\n" + if LessThanProc.with(RUBY_VERSION).call("1.9") + # Ruby < 1.9 needs a flush for a exit by signal, later + # rubies do not + ex << "STDOUT.flush\n" + end + ex << "raise SignalException, 'SIGTERM'\n" + ex + end + let(:exit_code) do + # signal mask 128 + plus signal 15 -> TERM + # this is specified by C99 + 128 + 15 + end + it_behaves_like "it runs" + end + context "the executable is empty", :bundler => "< 2" do let(:executable) { "" } |