зеркало из https://github.com/github/ruby.git
* test/net/imap/test_imap.rb: resurrection of r29259.
this change depends on minitest 1.7.1. * lib/test/unit/assertions.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
ae9264678c
Коммит
36cfaa8052
|
@ -1,3 +1,10 @@
|
|||
Mon Sep 27 15:25:05 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
|
||||
|
||||
* test/net/imap/test_imap.rb: resurrection of r29259.
|
||||
this change depends on minitest 1.7.1.
|
||||
|
||||
* lib/test/unit/assertions.rb: ditto.
|
||||
|
||||
Sun Sep 26 22:59:45 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* tool/config.sub (x86_64-pc-mingw64): regularize.
|
||||
|
|
|
@ -32,6 +32,8 @@ module Test
|
|||
end
|
||||
begin
|
||||
line = __LINE__; yield
|
||||
rescue MiniTest::Skip
|
||||
raise
|
||||
rescue Exception => e
|
||||
bt = e.backtrace
|
||||
as = e.instance_of?(MiniTest::Assertion)
|
||||
|
|
|
@ -49,9 +49,13 @@ class IMAPTest < Test::Unit::TestCase
|
|||
if defined?(OpenSSL)
|
||||
assert_raise(OpenSSL::SSL::SSLError) do
|
||||
imaps_test do |port|
|
||||
begin
|
||||
Net::IMAP.new("localhost",
|
||||
:port => port,
|
||||
:ssl => true)
|
||||
rescue SystemCallError
|
||||
skip $!
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -61,9 +65,13 @@ class IMAPTest < Test::Unit::TestCase
|
|||
if defined?(OpenSSL)
|
||||
assert_nothing_raised do
|
||||
imaps_test do |port|
|
||||
begin
|
||||
Net::IMAP.new("localhost",
|
||||
:port => port,
|
||||
:ssl => { :ca_file => CA_FILE })
|
||||
rescue SystemCallError
|
||||
skip $!
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -104,6 +112,8 @@ class IMAPTest < Test::Unit::TestCase
|
|||
imap
|
||||
end
|
||||
end
|
||||
rescue SystemCallError
|
||||
skip $!
|
||||
ensure
|
||||
if imap && !imap.disconnected?
|
||||
imap.disconnect
|
||||
|
|
Загрузка…
Ссылка в новой задаче