From: Sven Schöling Date: Wed, 26 Oct 2011 13:28:06 +0000 (+0200) Subject: Test zu post if robuster gegen PPI Parsingfehler gemacht. X-Git-Tag: release-2.7.0beta1~197 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f4d859337868ec181836a6acbefc3c764993b80f;p=kivitendo-erp.git Test zu post if robuster gegen PPI Parsingfehler gemacht. --- 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 || [] }) {