Skip to content

Commit

Permalink
Correctly skip the MMD tests if the repo is not checked-out.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkende committed Mar 23, 2024
1 parent 48a2ab9 commit 902a81c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions t/902-markdown-test-suite.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ while ($_ = shift) {
$filter{test_num} = shift @ARGV if /^-n$/;
}

my $test_suite = "${FindBin::Bin}/../third_party/MMD-Test-Suite";
skip_all('MMD-Test-Suite must be checked out.') unless -d $test_suite;

my $pmarkdown = Markdown::Perl->new(mode => 'markdown');

my $test_suite = "${FindBin::Bin}/../third_party/MMD-Test-Suite";
my $n = test_suite($test_suite."/Tests", $pmarkdown, %filter);
test_suite($test_suite."/Test", $pmarkdown, start_num => $n, %filter);

Expand Down
1 change: 0 additions & 1 deletion t/903-mmd-test-suite.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ while ($_ = shift) {
}

my $test_suite = "${FindBin::Bin}/../third_party/MMD-Test-Suite";
skip_all('MMD-Test-Suite must be checked out.') unless -d $test_suite;

my $pmarkdown = Markdown::Perl->new();

Expand Down
1 change: 1 addition & 0 deletions t/lib/MmdTest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ sub one_test {

sub test_suite {
my ($test_dir, $pmarkdown, %opt) = @_;
skip_all('MMD-Test-Suite must be checked out.') unless -d $test_dir;
my $i = $opt{start_num} // 0;
my %todo = map { $_ => 1 } @{$opt{todo} // []};
for my $md_file (glob "${test_dir}/*.text") {
Expand Down

0 comments on commit 902a81c

Please sign in to comment.