summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_system.rb
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-05 02:56:42 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-05 02:56:42 +0000
commit8fb85a996458874bfbd864d3e55cc1e69749cbc6 (patch)
tree8dc570bcfc105400f00ab658ef166085e0ef7575 /test/ruby/test_system.rb
parent1e0b97fab208a1ce7bce651517296dbf08021725 (diff)
downloadruby-8fb85a996458874bfbd864d3e55cc1e69749cbc6.tar.gz
ruby-8fb85a996458874bfbd864d3e55cc1e69749cbc6.tar.xz
ruby-8fb85a996458874bfbd864d3e55cc1e69749cbc6.zip
* test/ruby/envutil.rb: added. split "rubybin" from test_system.rb.
* test/ruby/test_system.rb: use envutil.rb * test/ruby/test_beginendblock.rb: added. * test/ruby/beginmainend.rb: added. used in test_beginendblock.rb. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_system.rb')
-rw-r--r--test/ruby/test_system.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index a3da43459..da4deb5a0 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -1,4 +1,5 @@
require 'test/unit'
+require "#{File.dirname(File.expand_path(__FILE__))}/envutil"
$KCODE = 'none'
@@ -8,11 +9,7 @@ class TestSystem < Test::Unit::TestCase
end
def test_system
- if File.exist? "miniruby" or File.exist? "miniruby.exe"
- ruby = "./miniruby"
- else
- ruby = "ruby"
- end
+ ruby = EnvUtil.rubybin
assert_equal("foobar\n", `echo foobar`)
assert_equal('foobar', `#{ruby} -e 'print "foobar"'`)