summaryrefslogtreecommitdiff
path: root/test/mandoc.t
diff options
context:
space:
mode:
Diffstat (limited to 'test/mandoc.t')
-rwxr-xr-xtest/mandoc.t27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/mandoc.t b/test/mandoc.t
new file mode 100755
index 0000000..9e7ffc3
--- /dev/null
+++ b/test/mandoc.t
@@ -0,0 +1,27 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.010;
+
+use Test::More tests => 1;
+
+SKIP: {
+ my $mandoc_present = 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', 1 );
+ }
+
+ for my $file ('feh') {
+ qx{mandoc -Tlint -Werror man/${file}.1};
+ is( $?, 0, "${file}.1: Valid mdoc syntax" );
+ }
+}