5 use File::Spec::Functions;
7 use OpenSSL::Test qw/:DEFAULT top_file/;
9 setup("check_testexes");
12 my $Makefile = top_file("Makefile");
13 if (open(FH, $Makefile)) {
15 (map { s/\R//; s/^VERSION=([^\s]*)\s*$//; $1 } grep { /^VERSION=/ } <FH>)[0];
19 my $MINFO = top_file("MINFO");
21 plan skip_all => "because MINFO not found. If you want this test to run, please do 'perl util/mkfiles.pl > MINFO'"
22 unless open(FH,$MINFO);
28 if (/^VERSION=([^\s]*)\s*$/) {
31 last if /^RELATIVE_DIRECTORY=test$/;
39 plan skip_all => "because MINFO is not from this OpenSSL version. If you want this test to run, please do 'perl util/mkfiles.pl > MINFO'"
40 unless $OpenSSL_ver eq $MINFO_ver;
45 map { s/\..*$//; # Remove extension
46 s/_?test$//; # Remove 'test', possibly prefixed with '_'
47 s/(sha\d+)t/$1/; # sha comes with no t at the end
48 $_; } split(/\s+/, $_);
50 plan tests => scalar @expected_tests;
53 map { basename($_) } glob(top_file("test", "recipes", "*.t"));
55 foreach my $test (sort @expected_tests) {
56 ok(scalar(grep(/^[0-9][0-9]-test_$test\.t$/, @found_tests)),
57 "check that a test for $test exists")
58 || diag("Expected to find something matching '[0-9][0-9]-test_$test.t'");