From: Andy Polyakov Date: Mon, 12 Oct 2015 20:24:27 +0000 (+0200) Subject: Test suite: chomp->s/\R// to harmonize with mingw 'make test'. X-Git-Tag: OpenSSL_1_1_0-pre1~432 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=85833408b4fb6e109cb05bf8dbe9cdb6bd8f280d;p=oweals%2Fopenssl.git Test suite: chomp->s/\R// to harmonize with mingw 'make test'. Reviewed-by: Richard Levitte --- diff --git a/test/recipes/00-check_testexes.t b/test/recipes/00-check_testexes.t index 3ab38c77af..c086f7f8cc 100644 --- a/test/recipes/00-check_testexes.t +++ b/test/recipes/00-check_testexes.t @@ -12,7 +12,7 @@ my $OpenSSL_ver = ""; my $Makefile = top_file("Makefile"); if (open(FH, $Makefile)) { $OpenSSL_ver = - (map { chomp; s/^VERSION=([^\s]*)\s*$//; $1 } grep { /^VERSION=/ } )[0]; + (map { s/\R//; s/^VERSION=([^\s]*)\s*$//; $1 } grep { /^VERSION=/ } )[0]; close FH; } @@ -24,14 +24,14 @@ plan skip_all => "because MINFO not found. If you want this test to run, please my $MINFO_ver = ""; while() { - chomp; + s/\R//; # chomp; if (/^VERSION=([^\s]*)\s*$/) { $MINFO_ver = $1; } last if /^RELATIVE_DIRECTORY=test$/; } while() { - chomp; + s/\R//; # chomp; last if /^EXE=/; } close FH; diff --git a/test/recipes/10-test_bn.t b/test/recipes/10-test_bn.t index 29b449fec9..a01d9bfef0 100644 --- a/test/recipes/10-test_bn.t +++ b/test/recipes/10-test_bn.t @@ -25,7 +25,7 @@ my $init = ok(run(test(["bntest"], stdout => $testresults)), 'initialize'); @lines = ; close DATA; } - chomp(@lines); + map { s/\R//; } @lines; # chomp(@lines); plan tests => scalar grep(/^print /, @lines); diff --git a/test/recipes/20-test_enc.t b/test/recipes/20-test_enc.t index bd5a436508..836d9792f9 100644 --- a/test/recipes/20-test_enc.t +++ b/test/recipes/20-test_enc.t @@ -21,7 +21,7 @@ my $test = catfile(".", "p"); my $cmd = "openssl"; my @ciphers = - map { chomp; s/^\s+//; s/\s+$//; split /\s+/ } + map { s/^\s+//; s/\s+$//; split /\s+/ } run(app([$cmd, "list", "-cipher-commands"]), capture => 1); plan tests => 1 + (scalar @ciphers)*2; diff --git a/test/recipes/25-test_req.t b/test/recipes/25-test_req.t index 4f9de779ed..ce1f869e2b 100644 --- a/test/recipes/25-test_req.t +++ b/test/recipes/25-test_req.t @@ -31,7 +31,7 @@ sub run_conversion { open DATA, "req-check.err"; SKIP: { plan skip_all => "skipping req conversion test for $reqfile" - if grep /Unknown Public Key/, map { chomp } ; + if grep /Unknown Public Key/, map { s/\R//; } ; tconversion("req", "testreq.pem", @openssl_args); } diff --git a/test/recipes/70-test_sslextension.t b/test/recipes/70-test_sslextension.t index 4aa3f61f7d..bd99b19b09 100755 --- a/test/recipes/70-test_sslextension.t +++ b/test/recipes/70-test_sslextension.t @@ -60,7 +60,7 @@ my $test_name = "test_sslextension"; setup($test_name); plan skip_all => "$test_name can only be performed with OpenSSL configured shared" - unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ } + unless (map { s/\R//; s/^SHARED_LIBS=\s*//; $_ } grep { /^SHARED_LIBS=/ } do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne ""; diff --git a/test/recipes/70-test_sslsessiontick.t b/test/recipes/70-test_sslsessiontick.t index a7a450ab58..9209fd7f41 100755 --- a/test/recipes/70-test_sslsessiontick.t +++ b/test/recipes/70-test_sslsessiontick.t @@ -61,7 +61,7 @@ my $test_name = "test_sslsessiontick"; setup($test_name); plan skip_all => "$test_name can only be performed with OpenSSL configured shared" - unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ } + unless (map { s/\R//; s/^SHARED_LIBS=\s*//; $_ } grep { /^SHARED_LIBS=/ } do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne ""; diff --git a/test/recipes/70-test_sslskewith0p.t b/test/recipes/70-test_sslskewith0p.t index d8d74b33e3..3f5e131e6b 100755 --- a/test/recipes/70-test_sslskewith0p.t +++ b/test/recipes/70-test_sslskewith0p.t @@ -60,7 +60,7 @@ my $test_name = "test_sslskewith0p"; setup($test_name); plan skip_all => "$test_name can only be performed with OpenSSL configured shared" - unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ } + unless (map { s/\R//; s/^SHARED_LIBS=\s*//; $_ } grep { /^SHARED_LIBS=/ } do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne ""; diff --git a/test/recipes/70-test_sslvertol.t b/test/recipes/70-test_sslvertol.t index 9717f80bdb..78c64105be 100755 --- a/test/recipes/70-test_sslvertol.t +++ b/test/recipes/70-test_sslvertol.t @@ -60,7 +60,7 @@ my $test_name = "test_sslextension"; setup($test_name); plan skip_all => "$test_name can only be performed with OpenSSL configured shared" - unless (map { chomp; s/^SHARED_LIBS=\s*//; $_ } + unless (map { s/\R//; s/^SHARED_LIBS=\s*//; $_ } grep { /^SHARED_LIBS=/ } do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne "";