summaryrefslogtreecommitdiffstats
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-07-21 15:14:20 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-07-21 15:14:20 +0000
commit886a768e9f13ffaef1b612ac614d03eb00daff27 (patch)
tree175bdd1bb138e0414385a9f0b4beeb33b19714d7 /regress
parent61d8492e62e86219a3d14042e27bd1aed009b47e (diff)
downloadmandoc-886a768e9f13ffaef1b612ac614d03eb00daff27.tar.gz
adjust test framework to not require a tty
Diffstat (limited to 'regress')
-rwxr-xr-xregress/copyless14
-rwxr-xr-xregress/regress.pl5
2 files changed, 3 insertions, 16 deletions
diff --git a/regress/copyless b/regress/copyless
deleted file mode 100755
index a00c0009..00000000
--- a/regress/copyless
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-set -e
-umask 022
-if [ "$#" -ne 4 ]; then
- echo "$0 $*: $# args instead of 4" 1>&2
- exit 1
-fi
-if [ "$2" != "-T" ]; then
- echo "$0 $*: second arg is not -T" 1>&2
- exit 1
-fi
-cut -d ' ' -f 1,3 "$3" > "$1.mandoc_tag"
-cp "$4" "$1.mandoc_ascii"
-exit 0
diff --git a/regress/regress.pl b/regress/regress.pl
index cb402875..ce4716df 100755
--- a/regress/regress.pl
+++ b/regress/regress.pl
@@ -267,12 +267,13 @@ for my $test (@regress_tests) {
$test->{NAME} =~ /^$onlytest/) {
$count_tag++;
$count_total++;
- local $ENV{MANPAGER} = "./copyless $test->{NAME}";
my @cmd = (qw(../man -l), @{$test->{MOPTS}},
- qw(-I os=OpenBSD -T ascii), $i);
+ qw(-I os=OpenBSD -T ascii -O),
+ "outfilename=$o,tagfilename=$to", "$i");
print "@cmd\n" if $targets{verbose};
system @cmd
and fail $test->{NAME}, 'tag:man';
+ system qw(sed -i), 's/ .*\// /', $to;
system @diff, $tw, $to
and fail $test->{NAME}, 'tag:diff';
print "." unless $targets{verbose};