+ diag "The default suppression file contains $count suppressions, of which $non_empty are not empty and $perl_related apply to perl";
+ close $supp_fh;
+}
+
+SKIP: {
+ my $dummy_vg = Test::Valgrind::FakeValgrind->new();
+ skip $dummy_vg => 2 unless ref $dummy_vg;
+
+ $sess = eval { Test::Valgrind::Session->new(
+ valgrind => $dummy_vg->path,
+ no_def_supp => 1,
+ extra_supp => [ 't/supp/no_perl' ],
+ )->run(
+ tool => $tool,
+ command => $cmd,
+ action => $dummy_action,
+ ) };
+ like $@, qr/No compatible suppressions available/,
+ 'incompatible suppression file';
+
+ $sess = eval { Test::Valgrind::Session->new(
+ valgrind => $dummy_vg->path,
+ no_def_supp => 1,
+ allow_no_supp => 1,
+ extra_supp => [ 't/supp/no_perl' ],
+ )->run(
+ tool => $tool,
+ command => $cmd,
+ action => $dummy_action,
+ ) };
+ is $@, '', 'incompatible suppression file, but forced';