X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=t%2F007broken_links.t;h=fbe5ea21b5e3f3a49332f5dc7005acac089f661f;hb=d6fed9b55a11dca1cfd9cd6f43940a945533d318;hp=ee0021ef814bfda4b81a0db4258dbb5c9c106bcf;hpb=e055700faea1906bea6c03184ba4516b57cac887;p=kivitendo-erp.git diff --git a/t/007broken_links.t b/t/007broken_links.t index ee0021ef8..fbe5ea21b 100644 --- a/t/007broken_links.t +++ b/t/007broken_links.t @@ -8,9 +8,13 @@ use strict; use File::Find; -use LWP::Simple; -use Test::More tests => 1; -use URI::Find; +use Test::More; + +if (eval " use LWP::Simple; use URI::Find; 1 ") { + plan tests => 1; +} else { + plan skip_all => "LWP::Simple or URI::Find not installed"; +} my @fails; @@ -26,14 +30,15 @@ my $finder = URI::Find->new(sub { }); find(sub { + return unless -f $File::Find::name; open(FH, $File::Find::name) or return; my $text; { local $/; $text = ; } $finder->find(\$text); - }, "." -); + }, "./templates", "./doc", + ); if (@fails) { ok(0, join "\n", @fails);