summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2022-12-27 00:01:46 +0900
committergit <[email protected]>2022-12-26 15:28:38 +0000
commita968d783a3dbd3585b6285c5c9c9ef11bd36b6f4 ()
tree597485701b92c2e14ef0127c5abab2e5d17b8fa2
parentd93d786338b3dca54595a6619f433607a834816a (diff)
[ruby/irb] Test colors with enabling colors
https://.com/ruby/irb/commit/998b7a74fa
-rw-r--r--test/irb/test_color.rb14
-rw-r--r--test/irb/test_color_printer.rb8
2 files changed, 22 insertions, 0 deletions
@@ -18,6 +18,20 @@ module TestIRB
MAGENTA = "\e[35m"
CYAN = "\e[36m"
def test_colorize
text = "text"
{
@@ -15,6 +15,10 @@ module TestIRB
CYAN = "\e[36m"
def setup
@get_screen_size = Reline.method(:get_screen_size)
Reline.instance_eval { undef :get_screen_size }
def Reline.get_screen_size
@@ -25,6 +29,10 @@ module TestIRB
def teardown
Reline.instance_eval { undef :get_screen_size }
Reline.define_singleton_method(:get_screen_size, @get_screen_size)
end
IRBTestColorPrinter = Struct.new(:a)