aboutsummaryrefslogtreecommitdiffstats
path: root/test/irb/test_cmd.rb
diff options
context:
space:
mode:
authorStan Lo <stan.lo@shopify.com>2022-12-08 19:10:19 +0000
committergit <svn-admin@ruby-lang.org>2022-12-08 19:10:23 +0000
commit3956bb859c2442d34ea171db8f92f3e5895c43d9 (patch)
tree4800d4eb49ceadec321f37e644ab98fb1f597aa6 /test/irb/test_cmd.rb
parent2cea8e014dbbbb68e4e8be367529b2beae564c54 (diff)
downloadruby-3956bb859c2442d34ea171db8f92f3e5895c43d9.tar.gz
[ruby/irb] Add "show_cmds" command to list all commands'
descriptions (https://github.com/ruby/irb/pull/463) https://github.com/ruby/irb/commit/7e857655ac
Diffstat (limited to 'test/irb/test_cmd.rb')
-rw-r--r--test/irb/test_cmd.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb
index db48e1f1ae..ac0c115339 100644
--- a/test/irb/test_cmd.rb
+++ b/test/irb/test_cmd.rb
@@ -583,6 +583,16 @@ module TestIRB
$bar = nil
end
+ def test_show_cmds
+ out, err = execute_lines(
+ "show_cmds\n"
+ )
+
+ assert_empty err
+ assert_match(/List all available commands and their description/, out)
+ assert_match(/Start the debugger of debug\.gem/, out)
+ end
+
class EditTest < CommandTestCase
def setup
@original_editor = ENV["EDITOR"]