From c843afbf6f841bfb18afef3e7c87e48591fd4689 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 13 Mar 2024 12:00:38 +0900 Subject: Chomp last punctuations from descriptions for `-h` The following parts will not be shown for `-h` option. And not to reach 80 columns. Some terminal emulators (Windows command prompt at least) wrap the cursor to the next line when reaching the rightmost column, before exceeding. --- test/ruby/test_rubyoptions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ruby') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 8b8d12d5ae..d5626a1a94 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -46,7 +46,7 @@ class TestRubyOptions < Test::Unit::TestCase def test_usage assert_in_out_err(%w(-h)) do |r, e| assert_operator(r.size, :<=, 25) - longer = r[1..-1].select {|x| x.size > 80} + longer = r[1..-1].select {|x| x.size >= 80} assert_equal([], longer) assert_equal([], e) end -- cgit v1.2.3