diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-03 04:43:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-03 04:43:25 +0000 |
commit | 6e65c89d3dbab6d314df2996a8c40d4b196749d2 (patch) | |
tree | 836324196d7e77dde5c52d264a29f7837040dd35 /spec/ruby/command_line | |
parent | ef01bbcf70762f8afdfad7104d7052c92b23b530 (diff) | |
download | ruby-6e65c89d3dbab6d314df2996a8c40d4b196749d2.tar.gz |
rubyopt_spec.rb: skip -v in RUBYOPT examples
* spec/ruby/command_line/rubyopt_spec.rb: skip -v in RUBYOPT
examples when CROSS_COMPILING is set by fake.rb. the version
number by -v is printed before loading libraries by -r options,
so setting RUBY_DESCRIPTION in fake.rb has no effect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/command_line')
-rw-r--r-- | spec/ruby/command_line/rubyopt_spec.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/spec/ruby/command_line/rubyopt_spec.rb b/spec/ruby/command_line/rubyopt_spec.rb index 50f5d5d0a8..fb06f60e51 100644 --- a/spec/ruby/command_line/rubyopt_spec.rb +++ b/spec/ruby/command_line/rubyopt_spec.rb @@ -22,14 +22,16 @@ describe "Processing RUBYOPT" do result.should =~ /value of \$DEBUG is true/ end - it "prints the version number for '-v'" do - ENV["RUBYOPT"] = '-v' - ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION - end - - it "ignores whitespace around the option" do - ENV["RUBYOPT"] = ' -v ' - ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION + unless CROSS_COMPILING + it "prints the version number for '-v'" do + ENV["RUBYOPT"] = '-v' + ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION + end + + it "ignores whitespace around the option" do + ENV["RUBYOPT"] = ' -v ' + ruby_exe("")[/\A.*/].should == RUBY_DESCRIPTION + end end it "sets $VERBOSE to true for '-w'" do |