mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@4f59d86
This commit is contained in:
parent
342fbae83c
commit
148961adcd
47 changed files with 725 additions and 61 deletions
|
@ -59,6 +59,26 @@ describe "Processing RUBYOPT" do
|
|||
ruby_exe("p $VERBOSE", escape: true).chomp.should == "true"
|
||||
end
|
||||
|
||||
ruby_version_is "2.7" do
|
||||
it "suppresses deprecation warnings for '-W:no-deprecated'" do
|
||||
ENV["RUBYOPT"] = '-W:no-deprecated'
|
||||
result = ruby_exe('$; = ""', args: '2>&1')
|
||||
result.should == ""
|
||||
end
|
||||
|
||||
it "suppresses experimental warnings for '-W:no-experimental'" do
|
||||
ENV["RUBYOPT"] = '-W:no-experimental'
|
||||
result = ruby_exe('0 in a', args: '2>&1')
|
||||
result.should == ""
|
||||
end
|
||||
|
||||
it "suppresses deprecation and experimental warnings for '-W:no-deprecated -W:no-experimental'" do
|
||||
ENV["RUBYOPT"] = '-W:no-deprecated -W:no-experimental'
|
||||
result = ruby_exe('($; = "") in a', args: '2>&1')
|
||||
result.should == ""
|
||||
end
|
||||
end
|
||||
|
||||
it "requires the file for '-r'" do
|
||||
f = fixture __FILE__, "rubyopt"
|
||||
ENV["RUBYOPT"] = "-r#{f}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue