[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
This commit is contained in:
parent
27d581ea6c
commit
91b106fe4b
@ -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"
|
||||
|
@ -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|
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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|
|
||||
|
@ -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
|
||||
|
@ -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'] : []
|
||||
|
@ -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/, [])
|
||||
|
@ -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
|
||||
|
@ -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|
|
||||
|
Loading…
x
Reference in New Issue
Block a user