projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test suite: minimal required to get mingw 'make test' work under Linux.
[openssl.git]
/
test
/
recipes
/
tconversion.pl
diff --git
a/test/recipes/tconversion.pl
b/test/recipes/tconversion.pl
index 4eef7c17a322ec65e1383b45c15bb082a5d3d54a..07e34060f395ed63ded85645f9fcf6e89e30c96a 100644
(file)
--- a/
test/recipes/tconversion.pl
+++ b/
test/recipes/tconversion.pl
@@
-9,8
+9,9
@@
use lib 'testlib';
use OpenSSL::Test qw/:DEFAULT top_file/;
my %conversionforms = (
use OpenSSL::Test qw/:DEFAULT top_file/;
my %conversionforms = (
+ # Default conversion forms. Other series may be added with
+ # specific test types as key.
"*" => [ "d", "p" ],
"*" => [ "d", "p" ],
- x509 => [ "d", "n", "p" ],
);
sub tconversion {
my $testtype = shift;
);
sub tconversion {
my $testtype = shift;
@@
-67,14
+68,14
@@
sub tconversion {
}
if ($testtype ne "p7d") {
}
if ($testtype ne "p7d") {
- is(c
ompare
_text("$testtype-fff.p", "$testtype-f.p"), 0,
+ is(c
mp
_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) {
'comparing orig to p');
}
foreach my $to (@conversionforms) {
next if $to eq "d";
foreach my $from (@conversionforms) {
- is(c
ompare
_text("$testtype-f.$to", "$testtype-ff.$from$to"), 0,
+ is(c
mp
_text("$testtype-f.$to", "$testtype-ff.$from$to"), 0,
"comparing $to to $from$to");
}
}
"comparing $to to $from$to");
}
}
@@
-84,4
+85,12
@@
sub tconversion {
unlink glob "$testtype-fff.*";
}
unlink glob "$testtype-fff.*";
}
+sub cmp_text {
+ return compare_text(@_, sub {
+ $_[0] =~ s/\R//g;
+ $_[1] =~ s/\R//g;
+ return $_[0] ne $_[1];
+ });
+}
+
1;
1;