1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use omit instead of skip without the default gems tests

This commit is contained in:
Hiroshi SHIBATA 2022-01-11 21:17:53 +09:00
parent 6d3ee418c2
commit f95039af75
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
7 changed files with 31 additions and 31 deletions

View file

@ -122,7 +122,7 @@ module DTrace
def trap_probe d_program, ruby_program def trap_probe d_program, ruby_program
if Hash === d_program if Hash === d_program
d_program = d_program[IMPL] or d_program = d_program[IMPL] or
skip "#{d_program} not implemented for #{IMPL}" omit "#{d_program} not implemented for #{IMPL}"
elsif String === d_program && IMPL == :stap elsif String === d_program && IMPL == :stap
d_program = dtrace2systemtap(d_program) d_program = dtrace2systemtap(d_program)
end end

View file

@ -6,14 +6,14 @@ class TestFiberEnumerator < Test::Unit::TestCase
MESSAGE = "Hello World" MESSAGE = "Hello World"
def test_read_characters def test_read_characters
skip "UNIXSocket is not defined!" unless defined?(UNIXSocket) omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
i, o = UNIXSocket.pair i, o = UNIXSocket.pair
unless i.nonblock? && o.nonblock? unless i.nonblock? && o.nonblock?
i.close i.close
o.close o.close
skip "I/O is not non-blocking!" omit "I/O is not non-blocking!"
end end
message = String.new message = String.new

View file

@ -6,14 +6,14 @@ class TestFiberIO < Test::Unit::TestCase
MESSAGE = "Hello World" MESSAGE = "Hello World"
def test_read def test_read
skip "UNIXSocket is not defined!" unless defined?(UNIXSocket) omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
i, o = UNIXSocket.pair i, o = UNIXSocket.pair
unless i.nonblock? && o.nonblock? unless i.nonblock? && o.nonblock?
i.close i.close
o.close o.close
skip "I/O is not non-blocking!" omit "I/O is not non-blocking!"
end end
message = nil message = nil
@ -41,7 +41,7 @@ class TestFiberIO < Test::Unit::TestCase
end end
def test_heavy_read def test_heavy_read
skip unless defined?(UNIXSocket) omit unless defined?(UNIXSocket)
16.times.map do 16.times.map do
Thread.new do Thread.new do
@ -64,14 +64,14 @@ class TestFiberIO < Test::Unit::TestCase
end end
def test_epipe_on_read def test_epipe_on_read
skip "UNIXSocket is not defined!" unless defined?(UNIXSocket) omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
i, o = UNIXSocket.pair i, o = UNIXSocket.pair
unless i.nonblock? && o.nonblock? unless i.nonblock? && o.nonblock?
i.close i.close
o.close o.close
skip "I/O is not non-blocking!" omit "I/O is not non-blocking!"
end end
error = nil error = nil
@ -142,7 +142,7 @@ class TestFiberIO < Test::Unit::TestCase
end end
def test_read_write_blocking def test_read_write_blocking
skip "UNIXSocket is not defined!" unless defined?(UNIXSocket) omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
i, o = UNIXSocket.pair i, o = UNIXSocket.pair
i.nonblock = false i.nonblock = false

View file

@ -8,7 +8,7 @@ class TestFiberIOBuffer < Test::Unit::TestCase
MESSAGE = "Hello World" MESSAGE = "Hello World"
def test_read_write_blocking def test_read_write_blocking
skip "UNIXSocket is not defined!" unless defined?(UNIXSocket) omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
i, o = UNIXSocket.pair i, o = UNIXSocket.pair
i.nonblock = false i.nonblock = false
@ -42,7 +42,7 @@ class TestFiberIOBuffer < Test::Unit::TestCase
end end
def test_timeout_after def test_timeout_after
skip "UNIXSocket is not defined!" unless defined?(UNIXSocket) omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
i, o = UNIXSocket.pair i, o = UNIXSocket.pair
i.nonblock = false i.nonblock = false
@ -76,7 +76,7 @@ class TestFiberIOBuffer < Test::Unit::TestCase
end end
def test_read_nonblock def test_read_nonblock
skip "UNIXSocket is not defined!" unless defined?(UNIXSocket) omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
i, o = UNIXSocket.pair i, o = UNIXSocket.pair
@ -101,7 +101,7 @@ class TestFiberIOBuffer < Test::Unit::TestCase
end end
def test_write_nonblock def test_write_nonblock
skip "UNIXSocket is not defined!" unless defined?(UNIXSocket) omit "UNIXSocket is not defined!" unless defined?(UNIXSocket)
i, o = UNIXSocket.pair i, o = UNIXSocket.pair

View file

@ -4,7 +4,7 @@ require "fiber"
class TestFiberCurrentRactor < Test::Unit::TestCase class TestFiberCurrentRactor < Test::Unit::TestCase
def setup def setup
skip unless defined? Ractor omit unless defined? Ractor
end end
def test_ractor_shareable def test_ractor_shareable

View file

@ -140,7 +140,7 @@ class TestGc < Test::Unit::TestCase
end end
def test_stat_heap def test_stat_heap
skip 'stress' if GC.stress omit 'stress' if GC.stress
stat_heap = {} stat_heap = {}
stat = {} stat = {}
@ -187,7 +187,7 @@ class TestGc < Test::Unit::TestCase
end end
def test_stat_heap_constraints def test_stat_heap_constraints
skip 'stress' if GC.stress omit 'stress' if GC.stress
stat = GC.stat stat = GC.stat
stat_heap = GC.stat_heap stat_heap = GC.stat_heap

View file

@ -14,7 +14,7 @@ class TestPTY < Test::Unit::TestCase
def test_spawn_without_block def test_spawn_without_block
r, w, pid = PTY.spawn(RUBY, '-e', 'puts "a"') r, w, pid = PTY.spawn(RUBY, '-e', 'puts "a"')
rescue RuntimeError rescue RuntimeError
skip $! omit $!
else else
assert_equal("a\r\n", r.gets) assert_equal("a\r\n", r.gets)
ensure ensure
@ -34,7 +34,7 @@ class TestPTY < Test::Unit::TestCase
end end
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
end end
def test_commandline def test_commandline
@ -49,7 +49,7 @@ class TestPTY < Test::Unit::TestCase
end end
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
end end
def test_argv0 def test_argv0
@ -63,13 +63,13 @@ class TestPTY < Test::Unit::TestCase
end end
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
end end
def test_open_without_block def test_open_without_block
ret = PTY.open ret = PTY.open
rescue RuntimeError rescue RuntimeError
skip $! omit $!
else else
assert_kind_of(Array, ret) assert_kind_of(Array, ret)
assert_equal(2, ret.length) assert_equal(2, ret.length)
@ -100,7 +100,7 @@ class TestPTY < Test::Unit::TestCase
x x
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
else else
assert(r[0].closed?) assert(r[0].closed?)
assert(r[1].closed?) assert(r[1].closed?)
@ -115,7 +115,7 @@ class TestPTY < Test::Unit::TestCase
assert(master.closed?) assert(master.closed?)
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
else else
assert_nothing_raised { assert_nothing_raised {
PTY.open {|master, slave| PTY.open {|master, slave|
@ -133,7 +133,7 @@ class TestPTY < Test::Unit::TestCase
assert_equal("bar", slave.gets.chomp) assert_equal("bar", slave.gets.chomp)
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
end end
def test_stat_slave def test_stat_slave
@ -143,7 +143,7 @@ class TestPTY < Test::Unit::TestCase
assert_equal(0600, s.mode & 0777) assert_equal(0600, s.mode & 0777)
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
end end
def test_close_master def test_close_master
@ -152,7 +152,7 @@ class TestPTY < Test::Unit::TestCase
assert_raise(EOFError) { slave.readpartial(10) } assert_raise(EOFError) { slave.readpartial(10) }
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
end end
def test_close_slave def test_close_slave
@ -165,7 +165,7 @@ class TestPTY < Test::Unit::TestCase
) { master.readpartial(10) } ) { master.readpartial(10) }
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
end end
def test_getpty_nonexistent def test_getpty_nonexistent
@ -175,7 +175,7 @@ class TestPTY < Test::Unit::TestCase
begin begin
PTY.getpty(File.join(tmpdir, "no-such-command")) PTY.getpty(File.join(tmpdir, "no-such-command"))
rescue RuntimeError rescue RuntimeError
skip $! omit $!
end end
} }
end end
@ -194,7 +194,7 @@ class TestPTY < Test::Unit::TestCase
end until st2 = PTY.check(pid) end until st2 = PTY.check(pid)
end end
rescue RuntimeError rescue RuntimeError
skip $! omit $!
else else
assert_nil(st1) assert_nil(st1)
assert_equal(pid, st2.pid) assert_equal(pid, st2.pid)
@ -212,7 +212,7 @@ class TestPTY < Test::Unit::TestCase
st2 = assert_raise(PTY::ChildExited, bug2642) {PTY.check(pid, true)}.status st2 = assert_raise(PTY::ChildExited, bug2642) {PTY.check(pid, true)}.status
end end
rescue RuntimeError rescue RuntimeError
skip $! omit $!
else else
assert_nil(st1) assert_nil(st1)
assert_equal(pid, st2.pid) assert_equal(pid, st2.pid)
@ -234,6 +234,6 @@ class TestPTY < Test::Unit::TestCase
end end
} }
rescue RuntimeError rescue RuntimeError
skip $! omit $!
end end
end if defined? PTY end if defined? PTY