* test/rake/test_fileutils.rb (Rake::TestFileUtils#test_sh): uses
FileUtils::RUBY instead of fixed "ruby" so that the ruby command works fine in Ruby's "make test-all". (test_sh_with_a_single_string_argument): ditto. (test_sh_with_multiple_arguments): ditto. (test_sh_failure): ditto (test_sh_special_handling): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
984177a000
commit
9cf0627944
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Sat Oct 17 17:56:58 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||||
|
|
||||||
|
* test/rake/test_fileutils.rb (Rake::TestFileUtils#test_sh): uses
|
||||||
|
FileUtils::RUBY instead of fixed "ruby" so that the ruby command
|
||||||
|
works fine in Ruby's "make test-all".
|
||||||
|
(test_sh_with_a_single_string_argument): ditto.
|
||||||
|
(test_sh_with_multiple_arguments): ditto.
|
||||||
|
(test_sh_failure): ditto
|
||||||
|
(test_sh_special_handling): ditto.
|
||||||
|
|
||||||
Sat Oct 17 17:30:06 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
Sat Oct 17 17:30:06 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* bignum.c (big_split): fix off-by-one error. [ruby-dev:39501]
|
* bignum.c (big_split): fix off-by-one error. [ruby-dev:39501]
|
||||||
|
@ -132,7 +132,7 @@ class Rake::TestFileUtils < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_sh
|
def test_sh
|
||||||
verbose(false) { sh %{ruby #{ShellCommand}} }
|
verbose(false) { sh %{#{RUBY} #{ShellCommand}} }
|
||||||
assert true, "should not fail"
|
assert true, "should not fail"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -153,32 +153,32 @@ class Rake::TestFileUtils < Test::Unit::TestCase
|
|||||||
def test_sh_with_a_single_string_argument
|
def test_sh_with_a_single_string_argument
|
||||||
ENV['RAKE_TEST_SH'] = 'someval'
|
ENV['RAKE_TEST_SH'] = 'someval'
|
||||||
verbose(false) {
|
verbose(false) {
|
||||||
sh %{ruby #{BASEDIR}/check_expansion.rb #{env_var} someval}
|
sh %{#{RUBY} #{BASEDIR}/check_expansion.rb #{env_var} someval}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_sh_with_multiple_arguments
|
def test_sh_with_multiple_arguments
|
||||||
ENV['RAKE_TEST_SH'] = 'someval'
|
ENV['RAKE_TEST_SH'] = 'someval'
|
||||||
verbose(false) {
|
verbose(false) {
|
||||||
Sh.run 'ruby', File.expand_path('../check_no_expansion.rb', __FILE__), env_var, 'someval'
|
Sh.run RUBY, File.expand_path('../check_no_expansion.rb', __FILE__), env_var, 'someval'
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_sh_failure
|
def test_sh_failure
|
||||||
assert_raise(RuntimeError) {
|
assert_raise(RuntimeError) {
|
||||||
verbose(false) { Sh.run "ruby #{File.expand_path('../shellcommand.rb', __FILE__)} 1" }
|
verbose(false) { Sh.run "#{RUBY} #{File.expand_path('../shellcommand.rb', __FILE__)} 1" }
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_sh_special_handling
|
def test_sh_special_handling
|
||||||
count = 0
|
count = 0
|
||||||
verbose(false) {
|
verbose(false) {
|
||||||
sh(%{ruby #{ShellCommand}}) do |ok, res|
|
sh(%{#{RUBY} #{ShellCommand}}) do |ok, res|
|
||||||
assert(ok)
|
assert(ok)
|
||||||
assert_equal 0, res.exitstatus
|
assert_equal 0, res.exitstatus
|
||||||
count += 1
|
count += 1
|
||||||
end
|
end
|
||||||
sh(%{ruby #{ShellCommand} 1}) do |ok, res|
|
sh(%{#{RUBY} #{ShellCommand} 1}) do |ok, res|
|
||||||
assert(!ok)
|
assert(!ok)
|
||||||
assert_equal 1, res.exitstatus
|
assert_equal 1, res.exitstatus
|
||||||
count += 1
|
count += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user