summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-11 15:21:06 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-11 15:21:06 +0000
commit4b8e63e750e875fe64802913d16f53d91e37346d (patch)
tree4e857f7a079c63beb4c0e1616db01cb81ac7f980 /test
parent976557469a85feb2c0b13688a3c4da73cbbaff8b (diff)
downloadruby-4b8e63e750e875fe64802913d16f53d91e37346d.tar.gz
ruby-4b8e63e750e875fe64802913d16f53d91e37346d.tar.xz
ruby-4b8e63e750e875fe64802913d16f53d91e37346d.zip
merges r20053 and r20067 from trunk into ruby_1_9_1.
* ruby.c (moreswitches): splits option string and passes arguments. * ruby.c (proc_options): checks if allowed in RUBYOPT. * ruby.c (process_options): allows long style options in RUBYOPT. * ruby.c (load_file_internal): ditto in shebang. [ruby-dev:36979] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index ebe6023b0..c55c99d0d 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -199,12 +199,16 @@ class TestRubyOptions < Test::Unit::TestCase
ENV['RUBYOPT'] = ' - -'
assert_in_out_err([], "", [], [])
+ assert_in_out_err(['-e', 'p $:.include?(".")'], "", ["true"], [])
+
ENV['RUBYOPT'] = '-e "p 1"'
assert_in_out_err([], "", [], /invalid switch in RUBYOPT: -e \(RuntimeError\)/)
ENV['RUBYOPT'] = '-T1'
assert_in_out_err([], "", [], /no program input from stdin allowed in tainted mode \(SecurityError\)/)
+ assert_in_out_err(['-e', 'p $:.include?(".")'], "", ["false"], [])
+
ENV['RUBYOPT'] = '-T4'
assert_in_out_err([], "", [], /no program input from stdin allowed in tainted mode \(SecurityError\)/)