X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=test%2Ftestlib%2FOpenSSL%2FTest%2FSimple.pm;h=b596e5f2e877940b70dad5e3d5832f1df3c85187;hp=874a156f4ea3080a6d3d3db5607f881c4f0a3904;hb=2dc4be513b1ab59cce3f578488a870124dcff1b8;hpb=f5098edb14ce7da8db814dd392358d53c2b81496 diff --git a/test/testlib/OpenSSL/Test/Simple.pm b/test/testlib/OpenSSL/Test/Simple.pm index 874a156f4e..b596e5f2e8 100644 --- a/test/testlib/OpenSSL/Test/Simple.pm +++ b/test/testlib/OpenSSL/Test/Simple.pm @@ -17,7 +17,7 @@ OpenSSL::Test::Simple - a few very simple test functions use OpenSSL::Test::Simple; - simple_test("my_test_name", "des", "destest"); + simple_test("my_test_name", "destest", "des"); =head1 DESCRIPTION @@ -28,6 +28,7 @@ You could call them hacks if you wish. =cut use OpenSSL::Test; +use OpenSSL::Test::Utils; =over 4 @@ -51,17 +52,22 @@ A complete recipe looks like this: # algorithm (used to check if it's at all supported) # name of binary (the program that does the actual test) sub simple_test { - my ($name, $prgr, $algo, @rest) = @_; + my ($name, $prgr, @algos) = @_; setup($name); + if (scalar(disabled(@algos))) { + if (scalar(@algos) == 1) { + plan skip_all => $algos[0]." is not supported by this OpenSSL build"; + } else { + my $last = pop @algos; + plan skip_all => join(", ", @algos)." and $last are not supported by this OpenSSL build"; + } + } + plan tests => 1; - SKIP: { - skip "$algo is not supported by this OpenSSL build, skipping this test...", 1 - if $algo && run(app(["openssl", "no-$algo"])); - ok(run(test([$prgr])), "running $prgr"); - } + ok(run(test([$prgr])), "running $prgr"); } =head1 SEE ALSO @@ -71,7 +77,7 @@ L =head1 AUTHORS Richard Levitte Elevitte@openssl.orgE with inspiration -from Rich Salz Ersalz@openssl.org. +from Rich Salz Ersalz@openssl.orgE. =cut