diff options
| author | NARUSE, Yui <naruse@airemix.jp> | 2025-12-24 22:47:02 +0900 |
|---|---|---|
| committer | NARUSE, Yui <naruse@airemix.jp> | 2025-12-24 22:55:44 +0900 |
| commit | ba2f6972193cdbd7c1e77e26212513e47926b115 (patch) | |
| tree | 7dbcf8bf5ffe1e5c41c6cd7d1d1273431ddbe1f6 /test | |
| parent | 8de2622c1291afd29a9a570e6b396bbe722360a3 (diff) | |
Revert "Extract `ruby_api_version_name`"
This reverts commit 9b576cd6255aba97e5e2f55f4b09f00c7dd0e839.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_rubyoptions.rb | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 2ec6478a7f..96d932aea2 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -47,27 +47,26 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err([], "", [], []) end - version = RUBY_PATCHLEVEL == -1 ? "master" : "#{RUBY_VERSION_MAJOR}.#{RUBY_VERSION_MINOR}" - OPTIONS_LINK = "https://docs.ruby-lang.org/en/#{version}/ruby/options_md.html" - def test_usage assert_in_out_err(%w(-h)) do |r, e| - _, _, link, *r = r - assert_include(link, OPTIONS_LINK) - assert_operator(r.size, :<=, 24) - longer = r.select {|x| x.size >= 80} + assert_operator(r.size, :<=, 26) + longer = r[3..-1].select {|x| x.size >= 80} assert_equal([], longer) assert_equal([], e) + + version = RUBY_PATCHLEVEL == -1 ? "master" : "#{RUBY_VERSION_MAJOR}.#{RUBY_VERSION_MINOR}" + assert_include(r, "Details and examples at https://docs.ruby-lang.org/en/#{version}/ruby/options_md.html") end end def test_usage_long assert_in_out_err(%w(--help)) do |r, e| - _, _, link, *r = r - assert_include(link, OPTIONS_LINK) - longer = r.select {|x| x.size > 80} + longer = r[3..-1].select {|x| x.size > 80} assert_equal([], longer) assert_equal([], e) + + version = RUBY_PATCHLEVEL == -1 ? "master" : "#{RUBY_VERSION_MAJOR}.#{RUBY_VERSION_MINOR}" + assert_include(r, "Details and examples at https://docs.ruby-lang.org/en/#{version}/ruby/options_md.html") end end |
