Skip to content

Commit b74ce5e

Browse files
committed
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).
1 parent 2c70cfd commit b74ce5e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/case.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class TestCase < Test::Unit::TestCase
1717
TEST_DIR = test_dir
1818
racc = File.join(PROJECT_DIR, 'bin', 'racc')
1919
racc = File.join(PROJECT_DIR, '..', 'libexec', 'racc') unless File.exist?(racc)
20+
racc = 'racc' unless File.exist?(racc)
21+
2022
RACC = racc
2123
ASSET_DIR = File.join(TEST_DIR, 'assets') # test grammars
2224
REGRESS_DIR = File.join(TEST_DIR, 'regress') # known-good generated outputs

0 commit comments

Comments
 (0)