ruby-changes:67361
From: Hiroshi <ko1@a...>
Date: Mon, 30 Aug 2021 12:39:41 +0900 (JST)
Subject: [ruby-changes:67361] 598f4f4219 (master): [ruby/irb] Use pend instead of skip
https://git.ruby-lang.org/ruby.git/commit/?id=598f4f4219 From 598f4f42196a51d922f539fa885173c39312b427 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Mon, 31 May 2021 14:56:50 +0900 Subject: [ruby/irb] Use pend instead of skip https://github.com/ruby/irb/commit/f441ce35bf --- test/irb/test_color.rb | 2 +- test/irb/test_color_printer.rb | 2 +- test/irb/test_completion.rb | 2 +- test/irb/test_context.rb | 14 +++++++------- test/irb/test_raise_no_backtrace_exception.rb | 6 +++--- test/irb/test_ruby_lex.rb | 10 +++++----- test/irb/test_workspace.rb | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/test/irb/test_color.rb b/test/irb/test_color.rb index ba99b12..6ad64a0 100644 --- a/test/irb/test_color.rb +++ b/test/irb/test_color.rb @@ -147,7 +147,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_color.rb#L147 def test_colorize_code_complete_true unless complete_option_supported? - skip '`complete: true` is the same as `complete: false` in Ruby 2.6-' + pend '`complete: true` is the same as `complete: false` in Ruby 2.6-' end # `complete: true` behaviors. Warn end-of-file. diff --git a/test/irb/test_color_printer.rb b/test/irb/test_color_printer.rb index 1afc7cc..93ec700 100644 --- a/test/irb/test_color_printer.rb +++ b/test/irb/test_color_printer.rb @@ -30,7 +30,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_color_printer.rb#L30 def test_color_printer unless ripper_lexer_scan_supported? - skip 'Ripper::Lexer#scan is supported in Ruby 2.7+' + pend 'Ripper::Lexer#scan is supported in Ruby 2.7+' end { 1 => "#{BLUE}#{BOLD}1#{CLEAR}\n", diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index 535690a..ab57762 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -17,7 +17,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_completion.rb#L17 status = assert_in_out_err(cmds, "", //, [], bug5938) assert(status.success?, bug5938) rescue LoadError - skip "cannot load irb/completion" + pend "cannot load irb/completion" end end diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb index 56878af..8bc259d 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -79,7 +79,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_context.rb#L79 end def test_evaluate_with_encoding_error_without_lineno - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' assert_raise_with_message(EncodingError, /invalid symbol/) { @context.evaluate(%q[{"\xAE": 1}], 1) # The backtrace of this invalid encoding hash doesn't contain lineno. @@ -87,14 +87,14 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_context.rb#L87 end def test_evaluate_with_onigmo_warning - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' assert_warning("(irb):1: warning: character class has duplicated range: /[aa]/\n") do @context.evaluate('/[aa]/', 1) end end def test_eval_input - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' verbose, $VERBOSE = $VERBOSE, nil input = TestInputMethod.new([ "raise 'Foo'\n", @@ -117,7 +117,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_context.rb#L117 end def test_eval_input_raise2x - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' input = TestInputMethod.new([ "raise 'Foo'\n", "raise 'Bar'\n", @@ -449,7 +449,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_context.rb#L449 end def test_eval_input_with_exception - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' verbose, $VERBOSE = $VERBOSE, nil input = TestInputMethod.new([ "def hoge() fuga; end; def fuga() raise; end; hoge\n", @@ -479,7 +479,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_context.rb#L479 end def test_eval_input_with_invalid_byte_sequence_exception - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' verbose, $VERBOSE = $VERBOSE, nil input = TestInputMethod.new([ %Q{def hoge() fuga; end; def fuga() raise "A\\xF3B"; end; hoge\n}, @@ -509,7 +509,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_context.rb#L509 end def test_eval_input_with_long_exception - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' verbose, $VERBOSE = $VERBOSE, nil nesting = 20 generated_code = '' diff --git a/test/irb/test_raise_no_backtrace_exception.rb b/test/irb/test_raise_no_backtrace_exception.rb index 3031f00..530adc0 100644 --- a/test/irb/test_raise_no_backtrace_exception.rb +++ b/test/irb/test_raise_no_backtrace_exception.rb @@ -4,7 +4,7 @@ require 'test/unit' https://github.com/ruby/ruby/blob/trunk/test/irb/test_raise_no_backtrace_exception.rb#L4 module TestIRB class TestRaiseNoBacktraceException < Test::Unit::TestCase def test_raise_exception - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : [] assert_in_out_err(bundle_exec + %w[-rirb -W0 -e IRB.start(__FILE__) -- -f --], <<-IRB, /Exception: foo/, []) e = Exception.new("foo") @@ -15,7 +15,7 @@ IRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_raise_no_backtrace_exception.rb#L15 end def test_raise_exception_with_invalid_byte_sequence - skip if RUBY_ENGINE == 'truffleruby' || /mswin|mingw/ =~ RUBY_PLATFORM + pend if RUBY_ENGINE == 'truffleruby' || /mswin|mingw/ =~ RUBY_PLATFORM bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : [] assert_in_out_err(bundle_exec + %w[-rirb -W0 -e IRB.start(__FILE__) -- -f --], <<~IRB, /A\\xF3B \(StandardError\)/, []) raise StandardError, "A\\xf3B" @@ -23,7 +23,7 @@ IRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_raise_no_backtrace_exception.rb#L23 end def test_raise_exception_with_different_encoding_containing_invalid_byte_sequence - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' backup_home = ENV["HOME"] Dir.mktmpdir("test_irb_raise_no_backtrace_exception_#{$$}") do |tmpdir| ENV["HOME"] = tmpdir diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index 556afbd..d31d38d 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -138,7 +138,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_ruby_lex.rb#L138 def test_endless_range_at_end_of_line if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0') - skip 'Endless range is available in 2.6.0 or later' + pend 'Endless range is available in 2.6.0 or later' end input_with_prompt = [ PromptRow.new('001:0: :> ', %q(a = 3..)), @@ -479,7 +479,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_ruby_lex.rb#L479 def test_broken_heredoc if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7.0') - skip 'This test needs Ripper::Lexer#scan to take broken tokens' + pend 'This test needs Ripper::Lexer#scan to take broken tokens' end input_with_correct_indents = [ Row.new(%q(def foo), nil, 2, 1), @@ -511,7 +511,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_ruby_lex.rb#L511 end def assert_dynamic_prompt(lines, expected_prompt_list) - skip if RUBY_ENGINE == 'truffleruby' + pend if RUBY_ENGINE == 'truffleruby' ruby_lex = RubyLex.new() io = MockIO_DynamicPrompt.new(lines) do |prompt_list| error_message = <<~EOM @@ -555,7 +555,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_ruby_lex.rb#L555 def test_broken_percent_literal if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7.0') - skip 'This test needs Ripper::Lexer#scan to take broken tokens' + pend 'This test needs Ripper::Lexer#scan to take broken tokens' end tokens = RubyLex.ripper_lex_without_warning('%wwww') @@ -568,7 +568,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_ruby_lex.rb#L568 def test_broken_percent_literal_in_method if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7.0') - skip 'This test needs Ripper::Lexer#scan to take broken tokens' + pend 'This test needs Ripper::Lexer#scan to take broken tokens' end tokens = RubyLex.ripper_lex_without_warning(<<~EOC.chomp) diff --git a/test/irb/test_workspace.rb b/test/irb/test_workspace.rb index f028fc3..a39bea2 100644 --- a/test/irb/test_workspace.rb +++ b/test/irb/test_workspace.rb @@ -39,8 +39,8 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_workspace.rb#L39 end def test_code_around_binding_with_existing_unreadable_file - skip 'chmod cannot make file unreadable on windows' if windows? - skip 'skipped in root privilege' if Process.uid == 0 + pend 'chmod cannot make file unreadable on windows' if windows? + pend 'skipped in root privilege' if Process.uid == 0 Tempfile.create('irb') do |f| code = "IRB::WorkSpace.new(binding)\n" -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/