Commit 85833408 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Test suite: chomp->s/\R// to harmonize with mingw 'make test'.

parent 4ada8be2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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);

+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}
+1 −1
Original line number Diff line number Diff line
@@ -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 "";

Loading