mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_rubyopt):
test suite add '.' to RUBYLIB. remove checks. * test/ruby/test_require.rb (TestRequire#test_tainted_loadpath): the default tempdir directory /tmp is world writable, so SecrurityError would be raised. check removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2f262b2351
commit
cadee06b2a
3 changed files with 14 additions and 6 deletions
|
@ -199,16 +199,12 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
ENV['RUBYOPT'] = ' - -'
|
||||
assert_in_out_err([], "", [], [])
|
||||
|
||||
assert_in_out_err(['-e', 'p $:.include?(".")'], "", ["false"], [])
|
||||
|
||||
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\)/)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue