From 51d161980ae0e26602eb17bed5f9cc0beb61f9a3 Mon Sep 17 00:00:00 2001 From: "Thomas E. Enebo" Date: Thu, 10 Nov 2022 13:37:57 -0600 Subject: [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 --- test/racc/case.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') 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 -- cgit v1.2.3