summaryrefslogtreecommitdiff
path: root/test/racc
diff options
context:
space:
mode:
authorThomas E. Enebo <tom.enebo@gmail.com>2022-11-10 13:37:57 -0600
committergit <svn-admin@ruby-lang.org>2022-11-10 22:36:34 +0000
commit51d161980ae0e26602eb17bed5f9cc0beb61f9a3 (patch)
treeb140b649c65cd375544c24bc1de2d4d8fdb3d210 /test/racc
parent2b8191bdad7545b71f270d2b25a34cd2b3afa02f (diff)
downloadruby-51d161980ae0e26602eb17bed5f9cc0beb61f9a3.tar.gz
[ruby/racc] Make racc test more flexible (for JRuby).
JRuby uses these same files for testing racc. The existing logic will not find 'racc' in a JRuby project checkout. This change allows it to work by just assuming 'ruby -S racc' when running tests. This will not change C Ruby's detection when setting up tests (since earlier checks will find racc). https://github.com/ruby/racc/commit/b74ce5e018
Diffstat (limited to 'test/racc')
-rw-r--r--test/racc/case.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/racc/case.rb b/test/racc/case.rb
index d917f3a4e4..ebc30b8288 100644
--- a/test/racc/case.rb
+++ b/test/racc/case.rb
@@ -17,6 +17,8 @@ module Racc
TEST_DIR = test_dir
racc = File.join(PROJECT_DIR, 'bin', 'racc')
racc = File.join(PROJECT_DIR, '..', 'libexec', 'racc') unless File.exist?(racc)
+ racc = 'racc' unless File.exist?(racc)
+
RACC = racc
ASSET_DIR = File.join(TEST_DIR, 'assets') # test grammars
REGRESS_DIR = File.join(TEST_DIR, 'regress') # known-good generated outputs