Fix tests for ABI incompatible binary error messags

This commit is contained in:
Nobuyoshi Nakada 2022-07-17 10:18:08 +09:00
Родитель efa557cb58
Коммит d010eba2f4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7CD2805BFA3770C6
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -6,7 +6,8 @@ class TestABI < Test::Unit::TestCase
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 +24,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