2013-11-30 17:02:56 +00:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
require 5.008;
|
|
|
|
BEGIN { $^W = 1; }
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
require TestDriver;
|
|
|
|
|
|
|
|
my $td = new TestDriver('random');
|
|
|
|
|
2020-04-06 14:19:37 +00:00
|
|
|
my @providers = ();
|
|
|
|
if (exists $ENV{'QPDF_CRYPTO_PROVIDER'})
|
|
|
|
{
|
|
|
|
push(@providers, $ENV{'QPDF_CRYPTO_PROVIDER'});
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
open(Q, "qpdf --show-crypto|") or die;
|
|
|
|
while (<Q>)
|
|
|
|
{
|
|
|
|
s/\s+$//s;
|
|
|
|
push(@providers, $_);
|
|
|
|
}
|
|
|
|
close(Q);
|
|
|
|
}
|
|
|
|
foreach my $p (@providers)
|
|
|
|
{
|
|
|
|
$ENV{'QPDF_CRYPTO_PROVIDER'} = $p;
|
2013-11-30 17:02:56 +00:00
|
|
|
|
2020-04-06 14:19:37 +00:00
|
|
|
$td->runtest("Random Data Providers ($p)",
|
|
|
|
{$td->COMMAND => "random"},
|
|
|
|
{$td->STRING => "random: end of tests\n",
|
|
|
|
$td->EXIT_STATUS => 0},
|
|
|
|
$td->NORMALIZE_NEWLINES);
|
|
|
|
}
|
|
|
|
|
|
|
|
$td->report(scalar(@providers));
|