diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/erb/test_erb.rb | 1 | ||||
-rw-r--r-- | test/fiddle/test_handle.rb | 37 | ||||
-rw-r--r-- | test/ruby/test_env.rb | 81 |
3 files changed, 0 insertions, 119 deletions
diff --git a/test/erb/test_erb.rb b/test/erb/test_erb.rb index 150df1dc26..1f1253fd23 100644 --- a/test/erb/test_erb.rb +++ b/test/erb/test_erb.rb @@ -89,7 +89,6 @@ class TestERBCore < Test::Unit::TestCase _test_core(nil) _test_core(0) _test_core(1) - _test_core(2) end def _test_core(safe) diff --git a/test/fiddle/test_handle.rb b/test/fiddle/test_handle.rb index 2655b1c0cb..2480230829 100644 --- a/test/fiddle/test_handle.rb +++ b/test/fiddle/test_handle.rb @@ -14,15 +14,6 @@ module Fiddle assert_kind_of Integer, handle.to_i end - def test_static_sym_secure - assert_raises(SecurityError) do - Thread.new do - $SAFE = 2 - Fiddle::Handle.sym('calloc') - end.join - end - end - def test_static_sym_unknown assert_raises(DLError) { Fiddle::Handle.sym('fooo') } assert_raises(DLError) { Fiddle::Handle['fooo'] } @@ -66,16 +57,6 @@ module Fiddle assert_raises(TypeError) { handle[nil] } end - def test_sym_secure - assert_raises(SecurityError) do - Thread.new do - $SAFE = 2 - handle = Handle.new(LIBC_SO) - handle.sym('calloc') - end.join - end - end - def test_sym handle = Handle.new(LIBC_SO) refute_nil handle.sym('calloc') @@ -99,24 +80,6 @@ module Fiddle assert_instance_of Handle, dlopen(LIBC_SO) end - def test_dlopen_safe - assert_raises(SecurityError) do - Thread.new do - $SAFE = 2 - dlopen(LIBC_SO) - end.join - end - end - - def test_initialize_safe - assert_raises(SecurityError) do - Thread.new do - $SAFE = 2 - Handle.new(LIBC_SO) - end.join - end - end - def test_initialize_noargs handle = Handle.new refute_nil handle['rb_str_new'] diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb index 541500a44f..6effa5197c 100644 --- a/test/ruby/test_env.rb +++ b/test/ruby/test_env.rb @@ -444,87 +444,6 @@ class TestEnv < Test::Unit::TestCase end end - def test_taint_aref - assert_raise(SecurityError) do - proc do - $SAFE = 2 - ENV["FOO".taint] - end.call - end - end - - def test_taint_fetch - assert_raise(SecurityError) do - proc do - $SAFE = 2 - ENV.fetch("FOO".taint) - end.call - end - end - - def test_taint_assoc - assert_raise(SecurityError) do - proc do - $SAFE = 2 - ENV.assoc("FOO".taint) - end.call - end - end - - def test_taint_rassoc - assert_raise(SecurityError) do - proc do - $SAFE = 2 - ENV.rassoc("FOO".taint) - end.call - end - end - - def test_taint_key - assert_raise(SecurityError) do - proc do - $SAFE = 2 - ENV.key("FOO".taint) - end.call - end - end - - def test_taint_key_p - assert_raise(SecurityError) do - proc do - $SAFE = 2 - ENV.key?("FOO".taint) - end.call - end - end - - def test_taint_value_p - assert_raise(SecurityError) do - proc do - $SAFE = 2 - ENV.value?("FOO".taint) - end.call - end - end - - def test_taint_aset_value - assert_raise(SecurityError) do - proc do - $SAFE = 2 - ENV["FOO"] = "BAR".taint - end.call - end - end - - def test_taint_aset_key - assert_raise(SecurityError) do - proc do - $SAFE = 2 - ENV["FOO".taint] = "BAR" - end.call - end - end - if RUBY_PLATFORM =~ /bccwin|mswin|mingw/ def test_memory_leak_aset bug9977 = '[ruby-dev:48323] [Bug #9977]' |