1 package OpenSSL::Test::Simple;
7 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
10 @EXPORT = qw(simple_test);
14 OpenSSL::Test::Simple - a few very simple test functions
18 use OpenSSL::Test::Simple;
20 simple_test("my_test_name", "des", "destest");
24 Sometimes, the functions in L<OpenSSL::Test> are quite tedious for some
25 repetitive tasks. This module provides functions to make life easier.
26 You could call them hacks if you wish.
31 use OpenSSL::Test::Utils;
35 =item B<simple_test NAME, PROGRAM, ALGORITHM>
37 Runs a test named NAME, running the program PROGRAM with no arguments,
38 to test the algorithm ALGORITHM.
40 A complete recipe looks like this:
42 use OpenSSL::Test::Simple;
44 simple_test("test_bf", "bftest", "bf");
51 # name (used with setup())
52 # algorithm (used to check if it's at all supported)
53 # name of binary (the program that does the actual test)
55 my ($name, $prgr, $algo, @rest) = @_;
61 skip "$algo is not supported by this OpenSSL build, skipping this test...", 1
62 if $algo && disabled($algo);
64 ok(run(test([$prgr])), "running $prgr");
74 Richard Levitte E<lt>levitte@openssl.orgE<gt> with inspiration
75 from Rich Salz E<lt>rsalz@openssl.orgE<gt>.