Tests adjustments for default output change
authorDmitry Belyavskiy <beldmit@gmail.com>
Mon, 13 Sep 2021 17:24:24 +0000 (19:24 +0200)
committerDmitry Belyavskiy <beldmit@gmail.com>
Tue, 21 Sep 2021 12:08:41 +0000 (14:08 +0200)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16583)

test/recipes/25-test_rusext.t
test/recipes/80-test_pkcs12.t

index 05727f9d04f9885a22a0e8ab1300930bface0aeb..6c02ed1ba23217ca21aba5f43d5b0cb55049e9a7 100644 (file)
@@ -16,7 +16,7 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/;
 
 setup("test_rusext");
 
-plan tests => 5;
+plan tests => 7;
 
 require_ok(srctop_file('test', 'recipes', 'tconversion.pl'));
 my $pem = srctop_file("test/certs", "grfc.pem");
@@ -31,3 +31,7 @@ ok(run(app(["openssl", "x509", "-text", "-in", $pem, "-out", $out_utf8,
             "-nameopt", "utf8", "-certopt", "no_pubkey"])));
 is(cmp_text($out_utf8, srctop_file('test', 'recipes', '25-test_rusext_data', 'grfc.utf8')),
    0, 'Comparing utf8 output');
+ok(run(app(["openssl", "x509", "-text", "-in", $pem, "-out", $out_utf8,
+            "-certopt", "no_pubkey"])));
+is(cmp_text($out_utf8, srctop_file('test', 'recipes', '25-test_rusext_data', 'grfc.utf8')),
+   0, 'Comparing cyrillic utf8 output by default');
index 1f0cb4d5014881a570eedab3071e6688dad03861..759cc57118746b0c4201461eec474c09d48a2743 100644 (file)
@@ -143,7 +143,7 @@ my @pkcs12info = run(app(["openssl", "pkcs12", "-info", "-in", $outfile5,
                           "-passin", "pass:"]), capture => 1);
 
 # Test that with one input certificate, we get one output certificate
-ok(grep(/subject=CN = server.example/, @pkcs12info) == 1,
+ok(grep(/subject=CN\s*=\s*server.example/, @pkcs12info) == 1,
    "test one cert in output");
 # Test that the expected friendly name is present in the output
 ok(grep(/testname/, @pkcs12info) == 1, "test friendly name in output");