Permalink
Browse files

Fix for jrubyc test to work correctly with or without bin in PATH

git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@5934 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information...
headius committed Feb 14, 2008
1 parent 4acbde4 commit f10c8153ecf6740f70094f620f8faa4f8fe4200c
Showing with 5 additions and 4 deletions.
  1. +5 −4 test/compiler/test_jrubyc.rb
@@ -4,11 +4,12 @@
class TestJrubyc < Test::Unit::TestCase
def setup
+ @jruby_command = File.join(ENV_JAVA['jruby.home'], "bin", "jruby")
@jrubyc_command = File.join(ENV_JAVA['jruby.home'], "bin", "jrubyc")
end
def test_basic
begin
- output = `#{@jrubyc_command} #{__FILE__}`
+ output = `#{@jruby_command} #{@jrubyc_command} #{__FILE__}`
assert_equal(
"Compiling #{__FILE__} to class ruby/test/compiler/test_jrubyc\n",
@@ -22,7 +23,7 @@ def test_basic
def test_target
begin
- output = `#{@jrubyc_command} -t /tmp #{__FILE__}`
+ output = `#{@jruby_command} #{@jrubyc_command} -t /tmp #{__FILE__}`
assert_equal(
"Compiling #{__FILE__} to class ruby/test/compiler/test_jrubyc\n",
@@ -35,7 +36,7 @@ def test_target
end
def test_bad_target
- output = `#{@jrubyc_command} -t does_not_exist #{__FILE__}`
+ output = `#{@jruby_command} #{@jrubyc_command} -t does_not_exist #{__FILE__}`
assert_equal(
"Target dir not found: does_not_exist\n",
@@ -45,7 +46,7 @@ def test_bad_target
def test_prefix
begin
- output = `#{@jrubyc_command} -p foo #{__FILE__}`
+ output = `#{@jruby_command} #{@jrubyc_command} -p foo #{__FILE__}`
assert_equal(
"Compiling #{__FILE__} to class foo/test/compiler/test_jrubyc\n",

0 comments on commit f10c815

Please sign in to comment.