aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2023-06-13 12:02:22 +0100
committergit <svn-admin@ruby-lang.org>2023-06-13 11:02:26 +0000
commit91b106fe4b6473e0a1bc3a021d279ddc52bc7de6 (patch)
tree2e17e67deec474ed628c09455362bb105a4a01b0
parent27d581ea6ccda94a5c999fa566add8a7b895c358 (diff)
downloadruby-91b106fe4b6473e0a1bc3a021d279ddc52bc7de6.tar.gz
[ruby/irb] Stanardise test class names with `Test` postfix instead
of prefix (https://github.com/ruby/irb/pull/603) https://github.com/ruby/irb/commit/359cb28def
-rw-r--r--test/irb/test_color.rb2
-rw-r--r--test/irb/test_color_printer.rb4
-rw-r--r--test/irb/test_completion.rb12
-rw-r--r--test/irb/test_context.rb2
-rw-r--r--test/irb/test_history.rb2
-rw-r--r--test/irb/test_init.rb2
-rw-r--r--test/irb/test_input_method.rb2
-rw-r--r--test/irb/test_option.rb2
-rw-r--r--test/irb/test_raise_no_backtrace_exception.rb2
-rw-r--r--test/irb/test_ruby_lex.rb2
-rw-r--r--test/irb/test_workspace.rb2
11 files changed, 17 insertions, 17 deletions
diff --git a/test/irb/test_color.rb b/test/irb/test_color.rb
index 652396c89e..c9d2512dc5 100644
--- a/test/irb/test_color.rb
+++ b/test/irb/test_color.rb
@@ -6,7 +6,7 @@ require 'stringio'
require_relative "helper"
module TestIRB
- class TestColor < TestCase
+ class ColorTest < TestCase
CLEAR = "\e[0m"
BOLD = "\e[1m"
UNDERLINE = "\e[4m"
diff --git a/test/irb/test_color_printer.rb b/test/irb/test_color_printer.rb
index a717940d81..f162b88548 100644
--- a/test/irb/test_color_printer.rb
+++ b/test/irb/test_color_printer.rb
@@ -6,7 +6,7 @@ require 'stringio'
require_relative "helper"
module TestIRB
- class TestColorPrinter < TestCase
+ class ColorPrinterTest < TestCase
CLEAR = "\e[0m"
BOLD = "\e[1m"
RED = "\e[31m"
@@ -41,7 +41,7 @@ module TestIRB
{
1 => "#{BLUE}#{BOLD}1#{CLEAR}\n",
"a\nb" => %[#{RED}#{BOLD}"#{CLEAR}#{RED}a\\nb#{CLEAR}#{RED}#{BOLD}"#{CLEAR}\n],
- IRBTestColorPrinter.new('test') => "#{GREEN}#<struct TestIRB::TestColorPrinter::IRBTestColorPrinter#{CLEAR} a#{GREEN}=#{CLEAR}#{RED}#{BOLD}\"#{CLEAR}#{RED}test#{CLEAR}#{RED}#{BOLD}\"#{CLEAR}#{GREEN}>#{CLEAR}\n",
+ IRBTestColorPrinter.new('test') => "#{GREEN}#<struct TestIRB::ColorPrinterTest::IRBTestColorPrinter#{CLEAR} a#{GREEN}=#{CLEAR}#{RED}#{BOLD}\"#{CLEAR}#{RED}test#{CLEAR}#{RED}#{BOLD}\"#{CLEAR}#{GREEN}>#{CLEAR}\n",
Ripper::Lexer.new('1').scan => "[#{GREEN}#<Ripper::Lexer::Elem:#{CLEAR} on_int@1:0 END token: #{RED}#{BOLD}\"#{CLEAR}#{RED}1#{CLEAR}#{RED}#{BOLD}\"#{CLEAR}#{GREEN}>#{CLEAR}]\n",
Class.new{define_method(:pretty_print){|q| q.text("[__FILE__, __LINE__, __ENCODING__]")}}.new => "[#{CYAN}#{BOLD}__FILE__#{CLEAR}, #{CYAN}#{BOLD}__LINE__#{CLEAR}, #{CYAN}#{BOLD}__ENCODING__#{CLEAR}]\n",
}.each do |object, result|
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb
index 8cd14fed52..2a659818e3 100644
--- a/test/irb/test_completion.rb
+++ b/test/irb/test_completion.rb
@@ -5,13 +5,13 @@ require "irb"
require_relative "helper"
module TestIRB
- class TestCompletion < TestCase
+ class CompletionTest < TestCase
def setup
# make sure require completion candidates are not cached
IRB::InputCompletor.class_variable_set(:@@files_from_load_path, nil)
end
- class TestMethodCompletion < TestCompletion
+ class MethodCompletionTest < CompletionTest
def test_complete_string
assert_include(IRB::InputCompletor.retrieve_completion_data("'foo'.up", bind: binding), "'foo'.upcase")
# completing 'foo bar'.up
@@ -65,7 +65,7 @@ module TestIRB
end
end
- class TestRequireComepletion < TestCompletion
+ class RequireComepletionTest < CompletionTest
def test_complete_require
candidates = IRB::InputCompletor::CompletionProc.("'irb", "require ", "")
%w['irb/init 'irb/ruby-lex].each do |word|
@@ -139,7 +139,7 @@ module TestIRB
end
end
- class TestVariableCompletion < TestCompletion
+ class VariableCompletionTest < CompletionTest
def test_complete_variable
# Bug fix issues https://github.com/ruby/irb/issues/368
# Variables other than `str_example` and `@str_example` are defined to ensure that irb completion does not cause unintended behavior
@@ -181,7 +181,7 @@ module TestIRB
end
end
- class TestConstantCompletion < TestCompletion
+ class ConstantCompletionTest < CompletionTest
class Foo
B3 = 1
B1 = 1
@@ -198,7 +198,7 @@ module TestIRB
end
end
- class TestPerfectMatching < TestCompletion
+ class PerfectMatchingTest < CompletionTest
def setup
# trigger PerfectMatchedProc to set up RDocRIDriver constant
IRB::InputCompletor::PerfectMatchedProc.("foo", bind: binding)
diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb
index c4ca56aba6..5efbf045f2 100644
--- a/test/irb/test_context.rb
+++ b/test/irb/test_context.rb
@@ -6,7 +6,7 @@ require 'rubygems' if defined?(Gem)
require_relative "helper"
module TestIRB
- class TestContext < TestCase
+ class ContextTest < TestCase
def setup
IRB.init_config(nil)
IRB.conf[:USE_SINGLELINE] = false
diff --git a/test/irb/test_history.rb b/test/irb/test_history.rb
index c74a3a2cb9..fc81d53005 100644
--- a/test/irb/test_history.rb
+++ b/test/irb/test_history.rb
@@ -6,7 +6,7 @@ require 'readline'
require_relative "helper"
module TestIRB
- class TestHistory < TestCase
+ class HistoryTest < TestCase
def setup
IRB.conf[:RC_NAME_GENERATOR] = nil
end
diff --git a/test/irb/test_init.rb b/test/irb/test_init.rb
index d9e338da8d..9f3f2a1098 100644
--- a/test/irb/test_init.rb
+++ b/test/irb/test_init.rb
@@ -5,7 +5,7 @@ require "fileutils"
require_relative "helper"
module TestIRB
- class TestInit < TestCase
+ class InitTest < TestCase
def setup
# IRBRC is for RVM...
@backup_env = %w[HOME XDG_CONFIG_HOME IRBRC].each_with_object({}) do |env, hash|
diff --git a/test/irb/test_input_method.rb b/test/irb/test_input_method.rb
index fdfb566390..ea7efb5dd5 100644
--- a/test/irb/test_input_method.rb
+++ b/test/irb/test_input_method.rb
@@ -5,7 +5,7 @@ require "irb"
require_relative "helper"
module TestIRB
- class TestRelineInputMethod < TestCase
+ class RelineInputMethodTest < TestCase
def setup
@conf_backup = IRB.conf.dup
IRB.conf[:LC_MESSAGES] = IRB::Locale.new
diff --git a/test/irb/test_option.rb b/test/irb/test_option.rb
index e334cee6dd..fec31f384f 100644
--- a/test/irb/test_option.rb
+++ b/test/irb/test_option.rb
@@ -2,7 +2,7 @@
require_relative "helper"
module TestIRB
- class TestOption < TestCase
+ class OptionTest < TestCase
def test_end_of_option
bug4117 = '[ruby-core:33574]'
bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []
diff --git a/test/irb/test_raise_no_backtrace_exception.rb b/test/irb/test_raise_no_backtrace_exception.rb
index 9565419cdd..929577ad8e 100644
--- a/test/irb/test_raise_no_backtrace_exception.rb
+++ b/test/irb/test_raise_no_backtrace_exception.rb
@@ -4,7 +4,7 @@ require "tmpdir"
require_relative "helper"
module TestIRB
- class TestRaiseNoBacktraceException < TestCase
+ class RaiseNoBacktraceExceptionTest < TestCase
def test_raise_exception
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/, [])
diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb
index 1530a16d6a..aa27204e26 100644
--- a/test/irb/test_ruby_lex.rb
+++ b/test/irb/test_ruby_lex.rb
@@ -6,7 +6,7 @@ require 'ostruct'
require_relative "helper"
module TestIRB
- class TestRubyLex < TestCase
+ class RubyLexTest < TestCase
Row = Struct.new(:content, :current_line_spaces, :new_line_spaces, :nesting_level)
class MockIO_AutoIndent
diff --git a/test/irb/test_workspace.rb b/test/irb/test_workspace.rb
index c6b8aa1e99..ff17b1a22c 100644
--- a/test/irb/test_workspace.rb
+++ b/test/irb/test_workspace.rb
@@ -8,7 +8,7 @@ require 'irb/color'
require_relative "helper"
module TestIRB
- class TestWorkSpace < TestCase
+ class WorkSpaceTest < TestCase
def test_code_around_binding
IRB.conf[:USE_COLORIZE] = false
Tempfile.create('irb') do |f|