summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-14 15:04:27 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-14 15:04:27 +0000
commit1d04a09d1decc93e3dce625b8416ab34b57e318d (patch)
tree27a0a0dfedd73b4cf204e4c5db2ad6f3863ed164 /test
parent599fac85a7027c582505e812da45d2657daddebf (diff)
* test/ruby/test_beginendblock.rb (test_should_propagate_signaled):
get rid of invoking shell. [ruby-dev:30942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/suicide.rb2
-rw-r--r--test/ruby/test_beginendblock.rb5
2 files changed, 4 insertions, 3 deletions
diff --git a/test/ruby/suicide.rb b/test/ruby/suicide.rb
new file mode 100644
index 0000000000..2687ed04cd
--- /dev/null
+++ b/test/ruby/suicide.rb
@@ -0,0 +1,2 @@
+STDERR.reopen(STDOUT)
+at_exit{Process.kill(:INT, $$)}
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb
index 4ac8de10ff..a60e41b848 100644
--- a/test/ruby/test_beginendblock.rb
+++ b/test/ruby/test_beginendblock.rb
@@ -69,15 +69,14 @@ EOW
def test_should_propagate_exit_code
ruby = EnvUtil.rubybin
- assert_equal false, system("#{q(ruby)} -e 'at_exit{exit 2}'")
+ assert_equal false, system(ruby, '-e', 'at_exit{exit 2}')
assert_equal 2, $?.exitstatus
assert_nil $?.termsig
end
def test_should_propagate_signaled
ruby = EnvUtil.rubybin
- out = IO.popen("#{q(ruby)} -e 'STDERR.reopen(STDOUT);" \
- "at_exit{Process.kill(:INT, $$)}'"){|f|
+ out = IO.popen("#{ruby} #{File.dirname(__FILE__)}/suicide.rb"){|f|
f.read
}
assert_match /Interrupt$/, out