From f4d859337868ec181836a6acbefc3c764993b80f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 26 Oct 2011 15:28:06 +0200 Subject: [PATCH] Test zu post if robuster gegen PPI Parsingfehler gemacht. --- t/structure/no_lexicals_in_postif.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/structure/no_lexicals_in_postif.t b/t/structure/no_lexicals_in_postif.t index 8532ab192..bb15c9cc9 100644 --- a/t/structure/no_lexicals_in_postif.t +++ b/t/structure/no_lexicals_in_postif.t @@ -24,8 +24,12 @@ my $fh; my @testitems = @Support::Files::testitems; foreach my $file (@testitems) { + next unless -f $file; my $clean = 1; - my $doc = PPI::Document->new($file); + my $doc = PPI::Document->new($file) or do { + ok 0, "PPI error for file $file: " . PPI::Document::errstr(); + next; + }; my $stmts = $doc->find('Statement::Variable'); for my $var (@{ $stmts || [] }) { -- 2.20.1