From 307814a52c19e5b0c6fa112bf9657551da0cf73d Mon Sep 17 00:00:00 2001 From: "hiroaki.osawa" Date: Fri, 20 Dec 2024 16:42:48 +0900 Subject: [PATCH] add context.ap_name test --- test/irb/test_context.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb index b02d8dbe0..d62331b3b 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -724,6 +724,13 @@ def test_build_completor IRB.conf[:COMPLETOR] = original_completor end + def test_ap_name + assert_equal 'irb', @context.ap_name + IRB.conf[:AP_NAME] = 'foo' + ap_name_modified_context = IRB::Context.new(nil, IRB::WorkSpace.new(Object.new), TestInputMethod.new) + assert_equal 'foo', ap_name_modified_context.ap_name + end + private def without_colorize