From 851e98a71282ed3d5ce9cb6eb88c93cabb5dc100 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 9 Dec 2015 17:21:23 +0000 Subject: test_ssl.rb: fix ssl option flags tests * test/openssl/test_ssl.rb (test_setting_twice): ignore fixed falgs. some flags like SSL_OP_NO_SSL_MASK cannot change. * test/openssl/test_ssl.rb (test_options_setting_nil_means_all): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/openssl/test_ssl.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/openssl/test_ssl.rb') diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 06e8d96b85..4398d7a0c5 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -28,7 +28,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase def test_setting_twice ctx = OpenSSL::SSL::SSLContext.new ctx.options = 4 - assert_equal 4, ctx.options + assert_equal 4, (ctx.options & OpenSSL::SSL::OP_ALL) ctx.options = OpenSSL::SSL::OP_ALL assert_equal OpenSSL::SSL::OP_ALL, ctx.options end @@ -36,7 +36,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase def test_options_setting_nil_means_all ctx = OpenSSL::SSL::SSLContext.new ctx.options = nil - assert_equal OpenSSL::SSL::OP_ALL, ctx.options + assert_equal(OpenSSL::SSL::OP_ALL, (OpenSSL::SSL::OP_ALL & ctx.options)) end def test_setting_options_raises_after_setup -- cgit v1.2.3