aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_rubyoptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r--test/ruby/test_rubyoptions.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index f927af2f2d..beb6a24e93 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -549,6 +549,13 @@ class TestRubyOptions < Test::Unit::TestCase
def test_setproctitle
skip "platform dependent feature" unless defined?(PSCMD) and PSCMD
+ assert_separately([], "#{<<-"{#"}\n#{<<-'};'}")
+ {#
+ assert_raise(ArgumentError) do
+ Process.setproctitle("hello\0")
+ end
+ };
+
with_tmpchdir do
write_file("test-script", "$_0 = $0.dup; Process.setproctitle('hello world'); $0 == $_0 or Process.setproctitle('$0 changed!'); sleep 60")