summaryrefslogtreecommitdiff
path: root/test/-ext-/test_abi.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-/test_abi.rb')
-rw-r--r--test/-ext-/test_abi.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/-ext-/test_abi.rb b/test/-ext-/test_abi.rb
index ec2050ecad..d3ea6bb9b1 100644
--- a/test/-ext-/test_abi.rb
+++ b/test/-ext-/test_abi.rb
@@ -1,12 +1,15 @@
# frozen_string_literal: true
+return unless RUBY_PATCHLEVEL < 0
+
class TestABI < Test::Unit::TestCase
def test_require_lib_with_incorrect_abi_on_dev_ruby
omit "ABI is not checked" unless abi_checking_supported?
assert_separately [], <<~RUBY
err = assert_raise(LoadError) { require "-test-/abi" }
- assert_match(/ABI version of binary is incompatible with this Ruby/, err.message)
+ assert_match(/incompatible ABI version/, err.message)
+ assert_include err.message, "/-test-/abi."
RUBY
end
@@ -23,7 +26,8 @@ class TestABI < Test::Unit::TestCase
assert_separately [{ "RUBY_ABI_CHECK" => "1" }], <<~RUBY
err = assert_raise(LoadError) { require "-test-/abi" }
- assert_match(/ABI version of binary is incompatible with this Ruby/, err.message)
+ assert_match(/incompatible ABI version/, err.message)
+ assert_include err.message, "/-test-/abi."
RUBY
end