Test suite: chomp->s/\R// to harmonize with mingw 'make test'.
authorAndy Polyakov <appro@openssl.org>
Mon, 12 Oct 2015 20:24:27 +0000 (22:24 +0200)
committerAndy Polyakov <appro@openssl.org>
Tue, 13 Oct 2015 17:48:03 +0000 (19:48 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
test/recipes/00-check_testexes.t
test/recipes/10-test_bn.t
test/recipes/20-test_enc.t
test/recipes/25-test_req.t
test/recipes/70-test_sslextension.t
test/recipes/70-test_sslsessiontick.t
test/recipes/70-test_sslskewith0p.t
test/recipes/70-test_sslvertol.t

index 3ab38c77afe65d0a999a6fc5217ec8efed5f08d9..c086f7f8cc8fe488eaf4a1e23834b8be512250fe 100644 (file)
@@ -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=/ } <FH>)[0];
+       (map { s/\R//; s/^VERSION=([^\s]*)\s*$//; $1 } grep { /^VERSION=/ } <FH>)[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(<FH>) {
-    chomp;
+    s/\R//;    # chomp;
     if (/^VERSION=([^\s]*)\s*$/) {
        $MINFO_ver = $1;
     }
     last if /^RELATIVE_DIRECTORY=test$/;
 }
 while(<FH>) {
-    chomp;
+    s/\R//;    # chomp;
     last if /^EXE=/;
 }
 close FH;
index 29b449fec94cc37777ea74d0bdfe93c51c099aee..a01d9bfef07effe5fba64ff08770f4a6f2c5cdeb 100644 (file)
@@ -25,7 +25,7 @@ my $init = ok(run(test(["bntest"], stdout => $testresults)), 'initialize');
             @lines = <DATA>;
             close DATA;
         }
-        chomp(@lines);
+        map { s/\R//; } @lines;        # chomp(@lines);
 
         plan tests => scalar grep(/^print /, @lines);
 
index bd5a436508ea4f3f86f490e7f8a043b16ceb7504..836d9792f95c4aa8e1a0b1704329c934bb36d93b 100644 (file)
@@ -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;
index 4f9de779ed21fc940712c7404a6985c777c5fac1..ce1f869e2b781d512be14830684775a078ee7052 100644 (file)
@@ -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 } <DATA>;
+             if grep /Unknown Public Key/, map { s/\R//; } <DATA>;
 
          tconversion("req", "testreq.pem", @openssl_args);
        }
index 4aa3f61f7d2b0863fb84bd9591545b428882d388..bd99b19b09b9a1385843ed41f6c60622b4d07ca2 100755 (executable)
@@ -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 "";
 
index a7a450ab58edd8cb0974d9e1aabdd63e0016097b..9209fd7f417f731efdc4ff968f2b2cc8793a020a 100755 (executable)
@@ -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 "";
 
index d8d74b33e3f2fbaabf8074e06e8e76de8745a56a..3f5e131e6b1959b170f8cc3d7abfd2d8943b8e46 100755 (executable)
@@ -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 "";
 
index 9717f80bdb8d8143cdbf9f5916134ca592ecb906..78c64105bef9783ce2385f34374d1dd07df7477a 100755 (executable)
@@ -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 "";