summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-05-09 11:31:47 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-05-09 11:31:47 +0200
commiteb8e62b333f5330a54c88dd6061607b0760ae82a (patch)
treedb156faf97d6b5d90cfa24e95a94208988144ded
parent801e12748fd179a5e4665b14ed9e897c2081be4e (diff)
Only run mandoc test if mandoc is available
-rw-r--r--Makefile1
-rwxr-xr-xtest/mandoc.t19
2 files changed, 19 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f348d57..8b8a00e 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,6 @@ all:
@${MAKE} -C src
test: all
- @mandoc -Tlint man/*
@PACKAGE=${PACKAGE} VERSION=${VERSION} prove test
install: install-man install-doc install-bin install-font install-img
diff --git a/test/mandoc.t b/test/mandoc.t
new file mode 100755
index 0000000..b0882ab
--- /dev/null
+++ b/test/mandoc.t
@@ -0,0 +1,19 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.010;
+
+use Test::More tests => 3;
+
+SKIP: {
+ qx{mandoc -V};
+
+ if ($? != 0) {
+ skip('mandoc not installed', 3);
+ }
+
+ for my $file ('feh', 'feh-cam', 'gen-cam-menu') {
+ qx{mandoc -Tlint man/${file}.1};
+ is($?, 0, "${file}.1: Valid mdoc syntax");
+ }
+}