Skip to content

Commit

Permalink
Slight pod edits
Browse files Browse the repository at this point in the history
  • Loading branch information
briandfoy committed Jun 17, 2023
1 parent aac0da8 commit f1d276b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions t/lib/common.pl
Expand Up @@ -112,8 +112,6 @@ =head2 Pre-defined tests
=item * compile_test
=back
=cut

sub compile_test {
Expand All @@ -122,17 +120,21 @@ sub compile_test {
subtest compile => sub {
return fail( "Program <$program> exists" )
unless -e $program;
pass( "Program <$program> exists" );
my $output = `"$^X" -c "$program" 2>&1`;
like $output, qr/syntax OK/, "$program compiles"
or diag( $output );
};
}

=item * sanity_test
=cut

sub sanity_test {
my( $program ) = @_;

my $rc = subtest "$program sanity test" => sub {
ok -e $program, "$program exists";
compile_test($program);
};

Expand All @@ -145,4 +147,8 @@ sub sanity_test {
$rc;
}

=back
=cut

1;

0 comments on commit f1d276b

Please sign in to comment.