зеркало из https://github.com/github/ruby.git
Use omit instead of skip for test-unit.
This commit is contained in:
Родитель
e87e10e5e7
Коммит
daf5ce3ba1
|
@ -201,6 +201,4 @@ class RDoc::TestCase < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
alias skip omit
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -168,7 +168,7 @@ class TestRDocGeneratorJsonIndex < RDoc::TestCase
|
||||||
begin
|
begin
|
||||||
require 'zlib'
|
require 'zlib'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
skip "no zlib"
|
omit "no zlib"
|
||||||
end
|
end
|
||||||
@g.generate
|
@g.generate
|
||||||
@g.generate_gzipped
|
@g.generate_gzipped
|
||||||
|
|
|
@ -32,7 +32,7 @@ class TestRDocI18nLocale < RDoc::TestCase
|
||||||
begin
|
begin
|
||||||
require 'gettext/po_parser'
|
require 'gettext/po_parser'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
skip 'gettext gem is not found'
|
omit 'gettext gem is not found'
|
||||||
end
|
end
|
||||||
|
|
||||||
fr_locale_dir = File.join @locale_dir, 'fr'
|
fr_locale_dir = File.join @locale_dir, 'fr'
|
||||||
|
|
|
@ -17,8 +17,8 @@ class TestRDocOptions < RDoc::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_check_files
|
def test_check_files
|
||||||
skip "assumes UNIX permission model" if /mswin|mingw/ =~ RUBY_PLATFORM
|
omit "assumes UNIX permission model" if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||||
skip "assumes that euid is not root" if Process.euid == 0
|
omit "assumes that euid is not root" if Process.euid == 0
|
||||||
|
|
||||||
out, err = capture_output do
|
out, err = capture_output do
|
||||||
temp_dir do
|
temp_dir do
|
||||||
|
|
|
@ -104,7 +104,7 @@ class TestRDocParser < RDoc::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_class_for_forbidden
|
def test_class_for_forbidden
|
||||||
skip 'chmod not supported' if Gem.win_platform?
|
omit 'chmod not supported' if Gem.win_platform?
|
||||||
|
|
||||||
tf = Tempfile.open 'forbidden' do |io|
|
tf = Tempfile.open 'forbidden' do |io|
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -163,7 +163,7 @@ class TestRDocRDoc < RDoc::TestCase
|
||||||
|
|
||||||
def test_normalized_file_list_non_file_directory
|
def test_normalized_file_list_non_file_directory
|
||||||
dev = File::NULL
|
dev = File::NULL
|
||||||
skip "#{dev} is not a character special" unless
|
omit "#{dev} is not a character special" unless
|
||||||
File.chardev? dev
|
File.chardev? dev
|
||||||
|
|
||||||
files = nil
|
files = nil
|
||||||
|
@ -349,8 +349,8 @@ class TestRDocRDoc < RDoc::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_parse_file_forbidden
|
def test_parse_file_forbidden
|
||||||
skip 'chmod not supported' if Gem.win_platform?
|
omit 'chmod not supported' if Gem.win_platform?
|
||||||
skip "assumes that euid is not root" if Process.euid == 0
|
omit "assumes that euid is not root" if Process.euid == 0
|
||||||
|
|
||||||
@rdoc.store = RDoc::Store.new
|
@rdoc.store = RDoc::Store.new
|
||||||
|
|
||||||
|
|
|
@ -1029,7 +1029,7 @@ Foo::Bar#bother
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_did_you_mean
|
def test_did_you_mean
|
||||||
skip 'skip test with did_you_men' unless defined? DidYouMean::SpellChecker
|
omit 'omit test with did_you_men' unless defined? DidYouMean::SpellChecker
|
||||||
|
|
||||||
util_ancestors_store
|
util_ancestors_store
|
||||||
|
|
||||||
|
@ -1227,7 +1227,7 @@ Foo::Bar#bother
|
||||||
|
|
||||||
with_dummy_pager do
|
with_dummy_pager do
|
||||||
@driver.page do |io|
|
@driver.page do |io|
|
||||||
skip "couldn't find a standard pager" if io == $stdout
|
omit "couldn't find a standard pager" if io == $stdout
|
||||||
|
|
||||||
assert @driver.paging?
|
assert @driver.paging?
|
||||||
end
|
end
|
||||||
|
@ -1239,7 +1239,7 @@ Foo::Bar#bother
|
||||||
# this test is too fragile. Perhaps using Process.spawn will make this
|
# this test is too fragile. Perhaps using Process.spawn will make this
|
||||||
# reliable
|
# reliable
|
||||||
def _test_page_in_presence_of_child_status
|
def _test_page_in_presence_of_child_status
|
||||||
skip 'this test hangs on travis-ci.org' if ENV['CI']
|
omit 'this test hangs on travis-ci.org' if ENV['CI']
|
||||||
@driver.use_stdout = false
|
@driver.use_stdout = false
|
||||||
|
|
||||||
with_dummy_pager do
|
with_dummy_pager do
|
||||||
|
@ -1407,7 +1407,7 @@ Foo::Bar#bother
|
||||||
|
|
||||||
pager = with_dummy_pager do @driver.setup_pager end
|
pager = with_dummy_pager do @driver.setup_pager end
|
||||||
|
|
||||||
skip "couldn't find a standard pager" unless pager
|
omit "couldn't find a standard pager" unless pager
|
||||||
|
|
||||||
assert @driver.paging?
|
assert @driver.paging?
|
||||||
ensure
|
ensure
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TestRDocRubygemsHook < Gem::TestCase
|
||||||
begin
|
begin
|
||||||
RDoc::RubygemsHook.load_rdoc
|
RDoc::RubygemsHook.load_rdoc
|
||||||
rescue Gem::DocumentError => e
|
rescue Gem::DocumentError => e
|
||||||
skip e.message
|
omit e.message
|
||||||
end
|
end
|
||||||
|
|
||||||
Gem.configuration[:rdoc] = nil
|
Gem.configuration[:rdoc] = nil
|
||||||
|
@ -205,8 +205,8 @@ class TestRDocRubygemsHook < Gem::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_remove_unwritable
|
def test_remove_unwritable
|
||||||
skip 'chmod not supported' if Gem.win_platform?
|
omit 'chmod not supported' if Gem.win_platform?
|
||||||
skip "assumes that euid is not root" if Process.euid == 0
|
omit "assumes that euid is not root" if Process.euid == 0
|
||||||
|
|
||||||
FileUtils.mkdir_p @a.base_dir
|
FileUtils.mkdir_p @a.base_dir
|
||||||
FileUtils.chmod 0, @a.base_dir
|
FileUtils.chmod 0, @a.base_dir
|
||||||
|
@ -235,8 +235,8 @@ class TestRDocRubygemsHook < Gem::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_setup_unwritable
|
def test_setup_unwritable
|
||||||
skip 'chmod not supported' if Gem.win_platform?
|
omit 'chmod not supported' if Gem.win_platform?
|
||||||
skip "assumes that euid is not root" if Process.euid == 0
|
omit "assumes that euid is not root" if Process.euid == 0
|
||||||
|
|
||||||
FileUtils.mkdir_p @a.doc_dir
|
FileUtils.mkdir_p @a.doc_dir
|
||||||
FileUtils.chmod 0, @a.doc_dir
|
FileUtils.chmod 0, @a.doc_dir
|
||||||
|
|
|
@ -294,7 +294,7 @@ class TestRDocServlet < RDoc::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_if_modified_since
|
def test_if_modified_since
|
||||||
skip 'File.utime on directory not supported' if Gem.win_platform?
|
omit 'File.utime on directory not supported' if Gem.win_platform?
|
||||||
|
|
||||||
temp_dir do
|
temp_dir do
|
||||||
now = Time.now
|
now = Time.now
|
||||||
|
@ -307,7 +307,7 @@ class TestRDocServlet < RDoc::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_if_modified_since_not_modified
|
def test_if_modified_since_not_modified
|
||||||
skip 'File.utime on directory not supported' if Gem.win_platform?
|
omit 'File.utime on directory not supported' if Gem.win_platform?
|
||||||
|
|
||||||
temp_dir do
|
temp_dir do
|
||||||
now = Time.now
|
now = Time.now
|
||||||
|
|
Загрузка…
Ссылка в новой задаче