summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-14 10:53:29 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-14 10:53:29 +0000
commit4c79752cdfd315b2cb0e933bb4196ca04696b89a (patch)
tree2823d1f581c12f44783550c1fc03f85bddab5830 /test/ruby
parent17807148446025ca1ad49a291edf0ea309a8e9d7 (diff)
* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_set_program_name):
add for $0 test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_rubyoptions.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index c483d1f216..d0522da06c 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -400,6 +400,14 @@ class TestRubyOptions < Test::Unit::TestCase
}
end
+ def test_set_program_name
+ skip if /linux|freebsd|netbsd|openbsd/ !~ RUBY_PLATFORM
+
+ $0 = 'hello world'
+ ps = `ps -p #{$$} -o cmd`
+ assert_match(/hello world/, ps)
+ end
+
def test_segv_test
opts = {}
if /mswin|mingw/ =~ RUBY_PLATFORM