From eb8e62b333f5330a54c88dd6061607b0760ae82a Mon Sep 17 00:00:00 2001
From: Daniel Friesel <derf@derf.homelinux.org>
Date: Sun, 9 May 2010 11:31:47 +0200
Subject: Only run mandoc test if mandoc is available

---
 test/mandoc.t | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100755 test/mandoc.t

(limited to 'test')

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");
+	}
+}
-- 
cgit v1.2.3