diff options
author | Thomas E. Enebo <[email protected]> | 2022-11-10 13:37:57 -0600 |
---|---|---|
committer | git <[email protected]> | 2022-11-10 22:36:34 +0000 |
commit | 51d161980ae0e26602eb17bed5f9cc0beb61f9a3 (patch) | |
tree | b140b649c65cd375544c24bc1de2d4d8fdb3d210 | |
parent | 2b8191bdad7545b71f270d2b25a34cd2b3afa02f (diff) |
[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
-rw-r--r-- | test/racc/case.rb | 2 |
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 |