]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/testlib/OpenSSL/Test/Simple.pm
Change OpenSSL::Test to be an extension of Test::More
[thirdparty/openssl.git] / test / testlib / OpenSSL / Test / Simple.pm
CommitLineData
93de4f58
RL
1package OpenSSL::Test::Simple;
2
3use strict;
4use warnings;
5
6use Exporter;
7use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
8$VERSION = "0.1";
9@ISA = qw(Exporter);
10@EXPORT = qw(simple_test);
11
12
93de4f58
RL
13use OpenSSL::Test;
14
15# args:
16# name (used with setup())
17# algorithm (used to check if it's at all supported)
18# name of binary (the program that does the actual test)
19sub simple_test {
20 my ($name, $prgr, $algo, @rest) = @_;
21
22 setup($name);
23
24 plan tests => 1;
25 SKIP: {
26 skip "$algo is not supported by this OpenSSL build, skipping this test...", 1
27 if $algo && run(app(["openssl", "no-$algo"]));
28
29 ok(run(test([$prgr])), "running $prgr");
30 }
31}