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.
34 =item B<simple_test NAME, PROGRAM, ALGORITHM>
36 Runs a test named NAME, running the program PROGRAM with no arguments,
37 to test the algorithm ALGORITHM.
39 A complete recipe looks like this:
41 use OpenSSL::Test::Simple;
43 simple_test("test_bf", "bftest", "bf");
50 # name (used with setup())
51 # algorithm (used to check if it's at all supported)
52 # name of binary (the program that does the actual test)
54 my ($name, $prgr, $algo, @rest) = @_;
60 skip "$algo is not supported by this OpenSSL build, skipping this test...", 1
61 if $algo && run(app(["openssl", "no-$algo"]));
63 ok(run(test([$prgr])), "running $prgr");
73 Richard Levitte E<lt>levitte@openssl.orgE<gt> with inspiration
74 from Rich Salz E<lt>rsalz@openssl.org<gt>.