File: mandoc.t

package info (click to toggle)
feh 3.11.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,544 kB
  • sloc: ansic: 13,164; perl: 968; makefile: 218; sh: 37
file content (27 lines) | stat: -rwxr-xr-x 489 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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" );
	}
}