aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-08 16:56:15 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-08 16:56:15 +0000
commit9b4c941b49c5f14befeef4b6481a79d9456f780b (patch)
tree8bc0abd99d7c4ebd2e26645d04ae5bd817781946
parent6a7ca0a529266d2f1768d55dd9f733bb9a14de8b (diff)
downloadmandoc-9b4c941b49c5f14befeef4b6481a79d9456f780b.tar.gz
mandoc-9b4c941b49c5f14befeef4b6481a79d9456f780b.tar.zst
mandoc-9b4c941b49c5f14befeef4b6481a79d9456f780b.zip
On some systems (e.g. Solaris 11) diff(1) does not support -a.
Make it easier to get rid of it.
-rwxr-xr-xregress/regress.pl16
1 files changed, 10 insertions, 6 deletions
diff --git a/regress/regress.pl b/regress/regress.pl
index 65a3ecc5..25e6d4f0 100755
--- a/regress/regress.pl
+++ b/regress/regress.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
-# $Id: regress.pl,v 1.1 2017/02/08 03:02:13 schwarze Exp $
+# $Id: regress.pl,v 1.2 2017/02/08 16:56:15 schwarze Exp $
#
# Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
#
@@ -24,6 +24,10 @@ use strict;
# nor for piping it into the Perl program.
use IPC::Open3 qw(open3);
+# Define this at one place such that it can easily be changed
+# if diff(1) does not support the -a option.
+my @diff = qw(diff -au);
+
# --- utility functions ------------------------------------------------
sub usage ($) {
@@ -227,7 +231,7 @@ for my $testname (@regress_testnames) {
print "@mandoc -T ascii $i\n" if $targets{verbose};
sysout $o, @mandoc, qw(-T ascii), $i
and fail $subdir, $testname, 'ascii:mandoc';
- system qw(diff -au), $w, $o
+ system @diff, $w, $o
and fail $subdir, $testname, 'ascii:diff';
}
my $m = "$subdir/$testname.in_man";
@@ -241,7 +245,7 @@ for my $testname (@regress_testnames) {
print "@mandoc -man -T ascii $m\n" if $targets{verbose};
sysout $mo, @mandoc, qw(-man -T ascii -O mdoc), $m
and fail $subdir, $testname, 'man:mandoc';
- system qw(diff -au), $w, $mo
+ system @diff, $w, $mo
and fail $subdir, $testname, 'man:diff';
}
if ($targets{clean}) {
@@ -266,7 +270,7 @@ for my $testname (@utf8_testnames) {
print "@mandoc -T utf8 $i\n" if $targets{verbose};
sysout $o, @mandoc, qw(-T utf8), $i
and fail $subdir, $testname, 'utf8:mandoc';
- system qw(diff -au), $w, $o
+ system @diff, $w, $o
and fail $subdir, $testname, 'utf8:diff';
}
if ($targets{clean}) {
@@ -287,7 +291,7 @@ for my $testname (@html_testnames) {
print "@mandoc -T html $i\n" if $targets{verbose};
syshtml $o, @mandoc, qw(-T html), $i
and fail $subdir, $testname, 'html:mandoc';
- system qw(diff -au), $w, $o
+ system @diff, $w, $o
and fail $subdir, $testname, 'html:diff';
}
if ($targets{clean}) {
@@ -308,7 +312,7 @@ for my $testname (@lint_testnames) {
print "@mandoc -T lint $i\n" if $targets{verbose};
syslint $o, @mandoc, qw(-T lint), $i
and fail $subdir, $testname, 'lint:mandoc';
- system qw(diff -au), $w, $o
+ system @diff, $w, $o
and fail $subdir, $testname, 'lint:diff';
}
if ($targets{clean}) {