diff options
Diffstat (limited to 'test/mandoc.t')
-rwxr-xr-x | test/mandoc.t | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/test/mandoc.t b/test/mandoc.t index 3740809..9e7ffc3 100755 --- a/test/mandoc.t +++ b/test/mandoc.t @@ -3,18 +3,25 @@ use strict; use warnings; use 5.010; -use Test::More tests => 3; +use Test::More tests => 1; SKIP: { - qx{mandoc -V}; + my $mandoc_present = 0; - if ( $? != 0 ) { + for my $path (split(qr{:}, $ENV{PATH})) { + if (-x "${path}/mandoc") { + $mandoc_present = 1; + last; + } + } + + if ( not $mandoc_present ) { diag('mandoc not installed, test skipped. This is NOT fatal.'); - skip( 'mandoc not installed', 3 ); + skip( 'mandoc not installed', 1 ); } - for my $file ( 'feh', 'feh-cam', 'gen-cam-menu' ) { - qx{mandoc -Tlint man/${file}.1}; + for my $file ('feh') { + qx{mandoc -Tlint -Werror man/${file}.1}; is( $?, 0, "${file}.1: Valid mdoc syntax" ); } } |