Skip to content

Commit

Permalink
Skip some tests on Windows and Perl 5.18/5.20
Browse files Browse the repository at this point in the history
It seems like the line

    croak("%s: invalid operation", GvNAME(CvGV(cv)));

causes crashes on Windows with some specific Perl versions.
  • Loading branch information
nwellnhof committed Aug 13, 2024
1 parent 150d125 commit fca3fba
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions t/20_errors.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,25 @@ my $paragraph = $doc->first_child;
my $emph = $paragraph->first_child;
my $text = $emph->first_child;

eval {
$text->insert_after($emph);
};
like($@, qr/insert_after: invalid operation/, 'insert_after dies');

eval {
$emph->set_list_tight(1);
};
like($@, qr/set_list_tight: invalid operation/, 'set_list_tight dies');

eval {
$paragraph->set_url('/url');
};
like($@, qr/set_url: invalid operation/, 'set_url dies');
SKIP: {
skip('Crashes for some reason', 3)
if $^O eq 'MSWin32' && $^V >= 5.018 && $^V < 5.022;

eval {
$text->insert_after($emph);
};
like($@, qr/insert_after: invalid operation/, 'insert_after dies');

eval {
$emph->set_list_tight(1);
};
like($@, qr/set_list_tight: invalid operation/, 'set_list_tight dies');

eval {
$paragraph->set_url('/url');
};
like($@, qr/set_url: invalid operation/, 'set_url dies');
}

eval {
$doc->render();
Expand Down

0 comments on commit fca3fba

Please sign in to comment.