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

[ruby/irb] Use pend instead of skip

https://github.com/ruby/irb/commit/f441ce35bf
This commit is contained in:
Hiroshi SHIBATA 2021-05-31 14:56:50 +09:00 committed by git
parent be9cc6c758
commit 598f4f4219
7 changed files with 20 additions and 20 deletions

View file

@ -147,7 +147,7 @@ module TestIRB
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.

View file

@ -30,7 +30,7 @@ module TestIRB
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",

View file

@ -17,7 +17,7 @@ module TestIRB
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

View file

@ -79,7 +79,7 @@ module TestIRB
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
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
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
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
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
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 = ''

View file

@ -4,7 +4,7 @@ require 'test/unit'
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
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
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

View file

@ -138,7 +138,7 @@ module TestIRB
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
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
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
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
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)

View file

@ -39,8 +39,8 @@ module TestIRB
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"