diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-02-22 22:25:12 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-03-14 17:56:55 +0900 |
| commit | 1ad366134ded1667745dd9fa70919051869f8d6c (patch) | |
| tree | 3f8c2432a327a5ee9e857df1b36c0fad678708f9 /test/ruby | |
| parent | f36a71e26995b69ff72bc132bbcf40ad89571414 (diff) | |
[Feature #20293] Add `Warning.categories`
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_rubyoptions.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index d5626a1a94..29810d5dd7 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -112,7 +112,8 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err(%w(-We) + ['p $-W'], "", %w(2), []) assert_in_out_err(%w(-w -W0 -e) + ['p $-W'], "", %w(0), []) - categories = {"deprecated"=>1, "experimental"=>0, "performance"=>2} + categories = {deprecated: 1, experimental: 0, performance: 2} + assert_equal categories.keys.sort, Warning.categories.sort categories.each do |category, level| assert_in_out_err(["-W:#{category}", "-e", "p Warning[:#{category}]"], "", %w(true), []) |
