From aa61d4237dad54e01c00f8cef4ba7f7cdffb8a80 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 5 Jun 2024 17:29:20 +0100 Subject: [ruby/irb] Add accidentally dropped disable_irb command back (https://github.com/ruby/irb/pull/964) * Add accidentally dropped disable_irb command back * Sort command files require by name https://github.com/ruby/irb/commit/1d627cebca --- test/irb/command/test_disable_irb.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/irb/command/test_disable_irb.rb (limited to 'test') diff --git a/test/irb/command/test_disable_irb.rb b/test/irb/command/test_disable_irb.rb new file mode 100644 index 0000000000..14a20043d5 --- /dev/null +++ b/test/irb/command/test_disable_irb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: false +require 'irb' + +require_relative "../helper" + +module TestIRB + class DisableIRBTest < IntegrationTestCase + def test_disable_irb_disable_further_irb_breakpoints + write_ruby <<~'ruby' + puts "First line" + puts "Second line" + binding.irb + puts "Third line" + binding.irb + puts "Fourth line" + ruby + + output = run_ruby_file do + type "disable_irb" + end + + assert_match(/First line\r\n/, output) + assert_match(/Second line\r\n/, output) + assert_match(/Third line\r\n/, output) + assert_match(/Fourth line\r\n/, output) + end + end +end -- cgit v1.2.3