summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-05-14 21:18:57 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-06-19 18:17:31 +0900
commitc110b59af5d1b1065c9e247260579e6212cb7fab (patch)
treefdc494ee616216768a0f887d41b595fb5044940d
parent1a2546c2be839baa7d0a50dc056d4d6987d26852 (diff)
Fixed path for ruby core repository.
-rw-r--r--test/racc/helper.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/racc/helper.rb b/test/racc/helper.rb
index 6e990f5b4c..1eaa7edfc6 100644
--- a/test/racc/helper.rb
+++ b/test/racc/helper.rb
@@ -9,9 +9,12 @@ module Racc
class TestCase < MiniTest::Unit::TestCase
PROJECT_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..'))
- TEST_DIR = File.join(PROJECT_DIR, 'test')
-
- RACC = File.join(PROJECT_DIR, 'bin', 'racc')
+ test_dir = File.join(PROJECT_DIR, 'test')
+ test_dir = File.join(PROJECT_DIR, 'racc') unless File.exist?(test_dir)
+ TEST_DIR = test_dir
+ racc = File.join(PROJECT_DIR, 'bin', 'racc')
+ racc = File.join(PROJECT_DIR, '..', 'libexec', 'racc') unless File.exist?(racc)
+ RACC = racc
OUT_DIR = File.join(TEST_DIR, 'out')
TAB_DIR = File.join(TEST_DIR, 'tab') # generated parsers go here
LOG_DIR = File.join(TEST_DIR, 'log')