diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-20 23:51:17 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-20 23:51:17 +0900 |
commit | 484c1be8956b7bb7a0253c6d6c7a740c341487fa (patch) | |
tree | 716f1a5feee4bd490b43ecf52da09acd08010914 /test | |
parent | 07e595fdbd75ed44473073cdf8cd758572d11709 (diff) |
Added `-W:experimental` command line option
[Feature #16420]
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 04a7016ae9..cac420422d 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -77,6 +77,8 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err(%w(-w -W0 -e) + ['p $-W'], "", %w(0), []) assert_in_out_err(%w(-W:deprecated -e) + ['p Warning[:deprecated]'], "", %w(true), []) assert_in_out_err(%w(-W:no-deprecated -e) + ['p Warning[:deprecated]'], "", %w(false), []) + assert_in_out_err(%w(-W:experimental -e) + ['p Warning[:experimental]'], "", %w(true), []) + assert_in_out_err(%w(-W:no-experimental -e) + ['p Warning[:experimental]'], "", %w(false), []) assert_in_out_err(%w(-W:qux), "", [], /unknown warning category: `qux'/) ensure ENV['RUBYOPT'] = save_rubyopt @@ -335,6 +337,10 @@ class TestRubyOptions < Test::Unit::TestCase assert_in_out_err(%w(), "p Warning[:deprecated]", ["true"]) ENV['RUBYOPT'] = '-W:no-deprecated' assert_in_out_err(%w(), "p Warning[:deprecated]", ["false"]) + ENV['RUBYOPT'] = '-W:experimental' + assert_in_out_err(%w(), "p Warning[:experimental]", ["true"]) + ENV['RUBYOPT'] = '-W:no-experimental' + assert_in_out_err(%w(), "p Warning[:experimental]", ["false"]) ENV['RUBYOPT'] = '-W:qux' assert_in_out_err(%w(), "", [], /unknown warning category: `qux'/) ensure |