summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-12-21 15:50:59 +0900
committergit <svn-admin@ruby-lang.org>2021-12-21 15:50:32 +0900
commit1855f901c801a4c21e0d2834da8ef914bf47f3d9 (patch)
tree91647108747e0603c3a9bd7768e0f8aa61334979 /test
parent093aaeffbc71cd652393b66f2f6f9b865ab31efd (diff)
[ruby/irb] Check colorize option correctly to clear char attr and don't use it for tests
https://github.com/ruby/irb/commit/de561cafeb
Diffstat (limited to 'test')
-rw-r--r--test/irb/test_context.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb
index d908195e6a..42f82fc37e 100644
--- a/test/irb/test_context.rb
+++ b/test/irb/test_context.rb
@@ -259,6 +259,7 @@ module TestIRB
end
def test_omit_on_assignment
+ IRB.conf[:USE_COLORIZE] = false
input = TestInputMethod.new([
"a = [1] * 100\n",
"a\n",
@@ -322,6 +323,7 @@ module TestIRB
end
def test_omit_multiline_on_assignment
+ IRB.conf[:USE_COLORIZE] = false
input = TestInputMethod.new([
"class A; def inspect; ([?* * 1000] * 3).join(%{\\n}); end; end; a = A.new\n",
"a\n"
@@ -347,7 +349,7 @@ module TestIRB
irb.eval_input
end
assert_empty err
- assert_equal("=> #{value_first_line[0..(input.winsize.last - 9)]}...\e[0m\n=> \n#{value}\n", out)
+ assert_equal("=> #{value_first_line[0..(input.winsize.last - 9)]}...\n=> \n#{value}\n", out)
irb.context.evaluate('A.remove_method(:inspect)', 0)
input.reset
@@ -395,6 +397,7 @@ module TestIRB
# Default
IRB.conf[:ECHO] = nil
IRB.conf[:ECHO_ON_ASSIGNMENT] = nil
+ IRB.conf[:USE_COLORIZE] = false
input = TestInputMethod.new()
irb = IRB::Irb.new(IRB::WorkSpace.new(Object.new), input)
@@ -422,6 +425,7 @@ module TestIRB
def main.inspect
"abc\ndef"
end
+ IRB.conf[:USE_COLORIZE] = false
input = TestInputMethod.new([
"self"
])