Skip to content

Commit

Permalink
Use pend instead of skip
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Aug 30, 2021
1 parent 4308329 commit f441ce3
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion test/irb/test_color.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test_colorize_code

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.
Expand Down
2 changes: 1 addition & 1 deletion test/irb/test_color_printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def teardown

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",
Expand Down
2 changes: 1 addition & 1 deletion test/irb/test_completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_nonstring_module_name
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

Expand Down
14 changes: 7 additions & 7 deletions test/irb/test_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,22 @@ def test_evaluate_with_exception
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.
}
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",
Expand All @@ -117,7 +117,7 @@ def test_eval_input
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",
Expand Down Expand Up @@ -449,7 +449,7 @@ def main.inspect
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",
Expand Down Expand Up @@ -479,7 +479,7 @@ def test_eval_input_with_exception
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},
Expand Down Expand Up @@ -509,7 +509,7 @@ def test_eval_input_with_invalid_byte_sequence_exception
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 = ''
Expand Down
6 changes: 3 additions & 3 deletions test/irb/test_raise_no_backtrace_exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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")
Expand All @@ -15,15 +15,15 @@ def e.backtrace; nil; end
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"
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
Expand Down
10 changes: 5 additions & 5 deletions test/irb/test_ruby_lex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def test_a_closed_brace_and_not_closed_brace_in_a_line

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..)),
Expand Down Expand Up @@ -479,7 +479,7 @@ def test_oneliner_def_in_multiple_lines

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),
Expand Down Expand Up @@ -511,7 +511,7 @@ def dynamic_prompt(&block)
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
Expand Down Expand Up @@ -555,7 +555,7 @@ def test_dyanmic_prompt_with_blank_line

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')
Expand All @@ -568,7 +568,7 @@ def test_broken_percent_literal

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)
Expand Down
4 changes: 2 additions & 2 deletions test/irb/test_workspace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def test_code_around_binding
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"
Expand Down

0 comments on commit f441ce3

Please sign in to comment.