aboutsummaryrefslogtreecommitdiffstats
path: root/test/openssl/test_engine.rb
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-29 05:47:09 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-29 05:47:09 +0000
commitc9dc0164b8ad1cb23faf6120749bcc349a7bfd45 (patch)
tree831281099f54c0be80293785761a46688a0711f3 /test/openssl/test_engine.rb
parent28bf4d545fb7674fcdc99c93ba7476d320551d11 (diff)
downloadruby-c9dc0164b8ad1cb23faf6120749bcc349a7bfd45.tar.gz
import Ruby/OpenSSL 2.0.0.beta.1
* NEWS, {ext,test,sample}/openssl: Import Ruby/OpenSSL 2.0.0.beta.1. ext/openssl is now converted into a default gem. The full commit history since r55538 can be found at: https://github.com/ruby/openssl/compare/08e1881f5663...v2.0.0.beta.1 [Feature #9612] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl/test_engine.rb')
-rw-r--r--test/openssl/test_engine.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/openssl/test_engine.rb b/test/openssl/test_engine.rb
index bbf56a1887..2d394cf797 100644
--- a/test/openssl/test_engine.rb
+++ b/test/openssl/test_engine.rb
@@ -14,7 +14,7 @@ class OpenSSL::TestEngine < OpenSSL::TestCase
def test_openssl_engine_builtin
with_openssl <<-'end;'
orig = OpenSSL::Engine.engines
- skip "'openssl' is already loaded" if orig.any? { |e| e.id == "openssl" }
+ pend "'openssl' is already loaded" if orig.any? { |e| e.id == "openssl" }
engine = OpenSSL::Engine.load("openssl")
assert_equal(true, engine)
assert_equal(1, OpenSSL::Engine.engines.size - orig.size)
@@ -24,7 +24,7 @@ class OpenSSL::TestEngine < OpenSSL::TestCase
def test_openssl_engine_by_id_string
with_openssl <<-'end;'
orig = OpenSSL::Engine.engines
- skip "'openssl' is already loaded" if orig.any? { |e| e.id == "openssl" }
+ pend "'openssl' is already loaded" if orig.any? { |e| e.id == "openssl" }
engine = get_engine
assert_not_nil(engine)
assert_equal(1, OpenSSL::Engine.engines.size - orig.size)
@@ -72,11 +72,18 @@ class OpenSSL::TestEngine < OpenSSL::TestCase
end;
end
+ def test_dup
+ with_openssl <<-'end;'
+ engine = get_engine
+ assert_raise(NoMethodError) { engine.dup }
+ end;
+ end
+
private
# this is required because OpenSSL::Engine methods change global state
def with_openssl(code)
- assert_separately(["-ropenssl"], <<~"end;")
+ assert_separately([{ "OSSL_MDEBUG" => nil }, "-ropenssl"], <<~"end;")
require #{__FILE__.dump}
include OpenSSL::TestEngine::Utils
#{code}