summaryrefslogtreecommitdiff
path: root/test/irb/command
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2024-06-05 17:29:20 +0100
committergit <svn-admin@ruby-lang.org>2024-06-05 16:29:29 +0000
commitaa61d4237dad54e01c00f8cef4ba7f7cdffb8a80 (patch)
treef20d3d3728e6cff3b059ef39a87817b5a6d58735 /test/irb/command
parent83f02d42e0a3c39661dc99c049ab9a70ff227d5b (diff)
[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
Diffstat (limited to 'test/irb/command')
-rw-r--r--test/irb/command/test_disable_irb.rb28
1 files changed, 28 insertions, 0 deletions
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