ruby-changes:3312
From: ko1@a...
Date: 31 Dec 2007 05:58:43 +0900
Subject: [ruby-changes:3312] usa - Ruby:r14805 (trunk): * test/net/imap/test_imap.rb: check OpenSSL definition before testing imaps.
usa 2007-12-31 05:58:31 +0900 (Mon, 31 Dec 2007) New Revision: 14805 Modified files: trunk/test/net/imap/test_imap.rb trunk/version.h Log: * test/net/imap/test_imap.rb: check OpenSSL definition before testing imaps. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/version.h?r1=14805&r2=14804 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/net/imap/test_imap.rb?r1=14805&r2=14804 Index: version.h =================================================================== --- version.h (revision 14804) +++ version.h (revision 14805) @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2007-12-30" +#define RUBY_RELEASE_DATE "2007-12-31" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20071230 +#define RUBY_RELEASE_CODE 20071231 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 30 +#define RUBY_RELEASE_DAY 31 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; Index: test/net/imap/test_imap.rb =================================================================== --- test/net/imap/test_imap.rb (revision 14804) +++ test/net/imap/test_imap.rb (revision 14805) @@ -19,50 +19,60 @@ end def test_imaps_unknown_ca - assert_raise(OpenSSL::SSL::SSLError) do - imaps_test do |port| - Net::IMAP.new("localhost", - :port => port, - :ssl => true) + if defined?(OpenSSL) + assert_raise(OpenSSL::SSL::SSLError) do + imaps_test do |port| + Net::IMAP.new("localhost", + :port => port, + :ssl => true) + end end end end def test_imaps_with_ca_file - assert_nothing_raised do - imaps_test do |port| - Net::IMAP.new("localhost", - :port => port, - :ssl => { :ca_file => CA_FILE }) + if defined?(OpenSSL) + assert_nothing_raised do + imaps_test do |port| + Net::IMAP.new("localhost", + :port => port, + :ssl => { :ca_file => CA_FILE }) + end end end end def test_imaps_verify_none - assert_nothing_raised do - imaps_test do |port| - Net::IMAP.new("localhost", - :port => port, - :ssl => { :verify_mode => OpenSSL::SSL::VERIFY_NONE }) + if defined?(OpenSSL) + assert_nothing_raised do + imaps_test do |port| + Net::IMAP.new("localhost", + :port => port, + :ssl => { :verify_mode => OpenSSL::SSL::VERIFY_NONE }) + end end end end def test_imaps_post_connection_check - assert_raise(OpenSSL::SSL::SSLError) do - imaps_test do |port| - Net::IMAP.new("127.0.0.1", - :port => port, - :ssl => { :ca_file => CA_FILE }) + if defined?(OpenSSL) + assert_raise(OpenSSL::SSL::SSLError) do + imaps_test do |port| + Net::IMAP.new("127.0.0.1", + :port => port, + :ssl => { :ca_file => CA_FILE }) + end end end end def test_starttls - starttls_test do |port| - imap = Net::IMAP.new("localhost", :port => port) - imap.starttls(:ca_file => CA_FILE) - imap + if defined?(OpenSSL) + starttls_test do |port| + imap = Net::IMAP.new("localhost", :port => port) + imap.starttls(:ca_file => CA_FILE) + imap + end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml