зеркало из https://github.com/github/ruby.git
test/openssl/test_config: skip tests for .include on older OpenSSL
The .include directive was initially added by OpenSSL 1.1.1, but the
syntax was later modified in 1.1.1b to improve compatibility with the
parser in <= 1.1.0. The test case expects 1.1.1b's parser.
95f59d398c
The test case is failing on Ubuntu 18.04 because it still uses the
initial 1.1.1 release:
http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210316T120003Z.fail.html.gz
This commit is contained in:
Родитель
44d67128a8
Коммит
e61e9bcfb2
|
@ -121,6 +121,11 @@ __EOC__
|
|||
end
|
||||
|
||||
def test_s_parse_include
|
||||
if !openssl?(1, 1, 1, 2)
|
||||
# OpenSSL < 1.1.1 parses .include directive as a normal assignment
|
||||
pend ".include directive is not supported"
|
||||
end
|
||||
|
||||
in_tmpdir("ossl-config-include-test") do |dir|
|
||||
Dir.mkdir("child")
|
||||
File.write("child/a.conf", <<~__EOC__)
|
||||
|
@ -150,10 +155,6 @@ __EOC__
|
|||
|
||||
# Include a file by relative path
|
||||
c1 = OpenSSL::Config.parse(include_file)
|
||||
if c1["sec-main"][".include"]
|
||||
# OpenSSL < 1.1.1 parses '.include =' as a normal assignment
|
||||
pend ".include directive is not supported"
|
||||
end
|
||||
assert_equal(["default", "sec-a", "sec-b", "sec-main"], c1.sections.sort)
|
||||
assert_equal(["file-a", "file-b", "file-main"], c1["default"].keys.sort)
|
||||
assert_equal({"a" => "123"}, c1["sec-a"])
|
||||
|
|
Загрузка…
Ссылка в новой задаче