ruby-changes:59781
From: aycabta <ko1@a...>
Date: Thu, 23 Jan 2020 14:32:10 +0900 (JST)
Subject: [ruby-changes:59781] 0d3e4b8a79 (master): Use omit instead of skip
https://git.ruby-lang.org/ruby.git/commit/?id=0d3e4b8a79 From 0d3e4b8a79dcbc25ab63819e1c05f31424560835 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Tue, 3 Dec 2019 12:46:55 +0900 Subject: Use omit instead of skip diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb index 0d807b2..4519772 100644 --- a/test/readline/test_readline.rb +++ b/test/readline/test_readline.rb @@ -27,7 +27,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L27 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 @@ -65,8 +65,8 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L65 # 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 @@ -154,7 +154,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L154 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 @@ -233,7 +233,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L233 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 = "" @@ -261,7 +261,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L261 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 @@ -335,7 +335,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L335 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) @@ -350,7 +350,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L350 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)) @@ -381,7 +381,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L381 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)) @@ -401,7 +401,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L401 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") @@ -432,10 +432,10 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L432 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 @@ -452,10 +452,10 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L452 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" @@ -482,8 +482,8 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L482 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 @@ -548,7 +548,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L548 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 @@ -586,7 +586,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L586 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 @@ -609,8 +609,8 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L609 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 @@ -683,9 +683,9 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L683 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 = "'\"" @@ -768,7 +768,7 @@ module BasetestReadline https://github.com/ruby/ruby/blob/trunk/test/readline/test_readline.rb#L768 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/