aboutsummaryrefslogtreecommitdiffstats
path: root/test/recipes/tconversion.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2015-10-12 22:16:07 +0200
committerAndy Polyakov <appro@openssl.org>2015-10-13 19:46:50 +0200
commit4ada8be2a6c538ee66a9a35a182052f359fc94b3 (patch)
tree941f1496ecc97a47007e8da5ae4a11d182569529 /test/recipes/tconversion.pl
parent1dce6c3f9eef0da2866b82d816dc945883427060 (diff)
downloadopenssl-4ada8be2a6c538ee66a9a35a182052f359fc94b3.tar.gz
Test suite: minimal required to get mingw 'make test' work under Linux.
(part by Alessandro Ghedini) Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/recipes/tconversion.pl')
-rw-r--r--test/recipes/tconversion.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/recipes/tconversion.pl b/test/recipes/tconversion.pl
index 011dcbffb9..07e34060f3 100644
--- a/test/recipes/tconversion.pl
+++ b/test/recipes/tconversion.pl
@@ -68,14 +68,14 @@ sub tconversion {
}
if ($testtype ne "p7d") {
- is(compare_text("$testtype-fff.p", "$testtype-f.p"), 0,
+ is(cmp_text("$testtype-fff.p", "$testtype-f.p"), 0,
'comparing orig to p');
}
foreach my $to (@conversionforms) {
next if $to eq "d";
foreach my $from (@conversionforms) {
- is(compare_text("$testtype-f.$to", "$testtype-ff.$from$to"), 0,
+ is(cmp_text("$testtype-f.$to", "$testtype-ff.$from$to"), 0,
"comparing $to to $from$to");
}
}
@@ -85,4 +85,12 @@ sub tconversion {
unlink glob "$testtype-fff.*";
}
+sub cmp_text {
+ return compare_text(@_, sub {
+ $_[0] =~ s/\R//g;
+ $_[1] =~ s/\R//g;
+ return $_[0] ne $_[1];
+ });
+}
+
1;