summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-10 07:43:01 +0900
committeraycabta <aycabta@gmail.com>2021-09-10 07:43:01 +0900
commit62cecea073a6d86f3176fba11762606c7e1ed2a1 (patch)
tree713e1014bc551964015e2d2f4558697846d152d7 /test
parent7cc298a484dfaec5d1af349b25f28b0cfb8c9c20 (diff)
Find irb command path in test
Diffstat (limited to 'test')
-rw-r--r--test/irb/test_workspace.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/irb/test_workspace.rb b/test/irb/test_workspace.rb
index e7f3aa85a4..7439796447 100644
--- a/test/irb/test_workspace.rb
+++ b/test/irb/test_workspace.rb
@@ -85,9 +85,16 @@ module TestIRB
pend if RUBY_ENGINE == 'truffleruby'
bug17623 = '[ruby-core:102468]'
bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []
+ if File.exist?('./exe/irb')
+ irb_path = './exe/irb'
+ elsif File.exist?('./libexec/irb')
+ irb_path = './libexec/irb'
+ else
+ omit 'irb command not found'
+ end
assert_in_out_err(bundle_exec + ['-W0', '-e', <<~RUBY , '--', '-f', '--'], 'binding.local_variables', /\[:_\]/, [], bug17623)
version = 'xyz' # typical rubygems loading file
- load('./exe/irb')
+ load('#{irb_path}')
RUBY
end