Skip to content

Commit

Permalink
Use omit instead of skip
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Jan 23, 2020
1 parent f09c1cf commit 0d3e4b8
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions test/readline/test_readline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def teardown
end

def test_readline
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
with_temp_stdio do |stdin, stdout|
stdin.write("hello\n")
stdin.close
Expand Down Expand Up @@ -65,8 +65,8 @@ def test_readline
# line_buffer
# point
def test_line_buffer__point
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
skip "GNU Readline has special behaviors" if defined?(Reline) and Readline == Reline
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "GNU Readline has special behaviors" if defined?(Reline) and Readline == Reline
begin
Readline.line_buffer
Readline.point
Expand Down Expand Up @@ -154,7 +154,7 @@ def test_completion_case_fold
end

def test_completion_proc_empty_result
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
with_temp_stdio do |stdin, stdout|
stdin.write("first\t")
stdin.flush
Expand Down Expand Up @@ -233,7 +233,7 @@ def test_completion_append_character
end

def test_completion_encoding
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
bug5941 = '[Bug #5941]'
append_character = Readline.completion_append_character
Readline.completion_append_character = ""
Expand Down Expand Up @@ -261,7 +261,7 @@ def test_completion_encoding
end or
begin
return if assert_under_utf8
skip("missing test for locale #{locale.name}")
omit("missing test for locale #{locale.name}")
end
expected = results[0][0...1]
Readline.completion_case_fold = false
Expand Down Expand Up @@ -335,7 +335,7 @@ def test_pre_input_hook
end

def test_point
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
assert_equal(0, Readline.point)
Readline.insert_text('12345')
assert_equal(5, Readline.point)
Expand All @@ -350,7 +350,7 @@ def test_point
end

def test_insert_text
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
str = "test_insert_text"
assert_equal(0, Readline.point)
assert_equal(Readline, Readline.insert_text(str))
Expand Down Expand Up @@ -381,7 +381,7 @@ def test_insert_text
end

def test_delete_text
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
str = "test_insert_text"
assert_equal(0, Readline.point)
assert_equal(Readline, Readline.insert_text(str))
Expand All @@ -401,7 +401,7 @@ def test_delete_text
end

def test_modify_text_in_pre_input_hook
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
with_temp_stdio {|stdin, stdout|
begin
stdin.write("world\n")
Expand Down Expand Up @@ -432,10 +432,10 @@ def test_modify_text_in_pre_input_hook
end

def test_input_metachar
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
# test will pass on Windows reline, but not readline
skip "Won't pass on mingw readline.so using 8.0.001" if /mingw/ =~ RUBY_PLATFORM and defined?(TestReadline) and kind_of?(TestReadline)
skip 'Needs GNU Readline 6 or later' if /mswin|mingw/ =~ RUBY_PLATFORM and defined?(TestReadline) and kind_of?(TestReadline) and Readline::VERSION < '6.0'
omit "Won't pass on mingw readline.so using 8.0.001" if /mingw/ =~ RUBY_PLATFORM and defined?(TestReadline) and kind_of?(TestReadline)
omit 'Needs GNU Readline 6 or later' if /mswin|mingw/ =~ RUBY_PLATFORM and defined?(TestReadline) and kind_of?(TestReadline) and Readline::VERSION < '6.0'
bug6601 = '[ruby-core:45682]'
Readline::HISTORY << "hello"
wo = nil
Expand All @@ -452,10 +452,10 @@ def test_input_metachar
end

def test_input_metachar_multibyte
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
unless Encoding.find("locale") == Encoding::UTF_8
return if assert_under_utf8
skip 'this test needs UTF-8 locale'
omit 'this test needs UTF-8 locale'
end
bug6602 = '[ruby-core:45683]'
Readline::HISTORY << "\u3042\u3093"
Expand All @@ -482,8 +482,8 @@ def test_input_metachar_multibyte
end

def test_refresh_line
skip "Only when refresh_line exists" unless Readline.respond_to?(:refresh_line)
skip unless respond_to?(:assert_ruby_status)
omit "Only when refresh_line exists" unless Readline.respond_to?(:refresh_line)
omit unless respond_to?(:assert_ruby_status)
bug6232 = '[ruby-core:43957] [Bug #6232] refresh_line after set_screen_size'
with_temp_stdio do |stdin, stdout|
replace_stdio(stdin.path, stdout.path) do
Expand Down Expand Up @@ -548,7 +548,7 @@ def test_using_quoting_detection_proc_with_multibyte_input
return unless Readline.respond_to?(:quoting_detection_proc=)
unless Encoding.find("external") == Encoding::UTF_8
return if assert_under_utf8
skip 'this test needs UTF-8 locale'
omit 'this test needs UTF-8 locale'
end

passed_text = nil
Expand Down Expand Up @@ -586,7 +586,7 @@ def test_using_quoting_detection_proc_with_multibyte_input
end

def test_simple_completion
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)

line = nil

Expand All @@ -609,8 +609,8 @@ def test_simple_completion
end

def test_completion_with_completion_append_character
skip "Skip Editline" if /EditLine/n.match(Readline::VERSION)
skip "Readline.completion_append_character is not implemented" unless Readline.respond_to?(:completion_append_character=)
omit "Skip Editline" if /EditLine/n.match(Readline::VERSION)
omit "Readline.completion_append_character is not implemented" unless Readline.respond_to?(:completion_append_character=)
line = nil

append_character = Readline.completion_append_character
Expand Down Expand Up @@ -683,9 +683,9 @@ def test_completion_quote_character_after_completion
return unless Readline.respond_to?(:completion_quote_character)
if /solaris/i =~ RUBY_PLATFORM
# http://rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-trunk/log/20181228T102505Z.fail.html.gz
skip 'This test does not succeed on Oracle Developer Studio for now'
omit 'This test does not succeed on Oracle Developer Studio for now'
end
skip 'Needs GNU Readline 6 or later' if /mswin|mingw/ =~ RUBY_PLATFORM and defined?(TestReadline) and kind_of?(TestReadline) and Readline::VERSION < '6.0'
omit 'Needs GNU Readline 6 or later' if /mswin|mingw/ =~ RUBY_PLATFORM and defined?(TestReadline) and kind_of?(TestReadline) and Readline::VERSION < '6.0'

Readline.completion_proc = -> (_) { [] }
Readline.completer_quote_characters = "'\""
Expand Down Expand Up @@ -768,7 +768,7 @@ def assert_under_utf8
return false if ENV['LC_ALL'] == 'UTF-8'
loc = caller_locations(1, 1)[0].base_label.to_s
assert_separately([{"LC_ALL"=>"UTF-8"}, "-r", __FILE__], <<SRC)
#skip "test \#{ENV['LC_ALL']}"
#omit "test \#{ENV['LC_ALL']}"
#{self.class.name}.new(#{loc.dump}).run(Test::Unit::Runner.new)
SRC
return true
Expand Down

0 comments on commit 0d3e4b8

Please sign in to comment.