aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2021-09-19 12:15:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2021-09-19 12:15:34 +0000
commit78753ab13629cd2ec6eb70e09342b8ea2766e96c (patch)
tree8458125ec3fd3c90e5b304b9b419ee672813a308
parent746ef658ed1082363ea1035016b4ffe961399b45 (diff)
downloadmandoc-78753ab13629cd2ec6eb70e09342b8ea2766e96c.tar.gz
mandoc-78753ab13629cd2ec6eb70e09342b8ea2766e96c.tar.zst
mandoc-78753ab13629cd2ec6eb70e09342b8ea2766e96c.zip
do not use the sed(1) -i option, it is not portable;
issue found on Oracle Solaris 11
-rwxr-xr-xregress/regress.pl13
1 files changed, 7 insertions, 6 deletions
diff --git a/regress/regress.pl b/regress/regress.pl
index fc320c07..3423ca63 100755
--- a/regress/regress.pl
+++ b/regress/regress.pl
@@ -1,8 +1,8 @@
#!/usr/bin/env perl
#
-# $Id: regress.pl,v 1.15 2020/07/21 15:14:20 schwarze Exp $
+# $Id: regress.pl,v 1.16 2021/09/19 12:15:34 schwarze Exp $
#
-# Copyright (c) 2017, 2018, 2019, 2020 Ingo Schwarze <schwarze@openbsd.org>
+# Copyright (c) 2017,2018,2019,2020,2021 Ingo Schwarze <schwarze@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -261,6 +261,7 @@ for my $test (@regress_tests) {
my $o = "$test->{NAME}.mandoc_ascii";
my $w = "$test->{NAME}.out_ascii";
my $to = "$test->{NAME}.mandoc_tag";
+ my $tos = "$test->{NAME}.mandoc_tag_s";
my $tw = "$test->{NAME}.out_tag";
my $diff_ascii;
if ($targets{tag} && $tag_tests{$test->{NAME}} &&
@@ -273,8 +274,8 @@ for my $test (@regress_tests) {
print "@cmd\n" if $targets{verbose};
system @cmd
and fail $test->{NAME}, 'tag:man';
- system qw(sed -i), 's/ .*\// /', $to;
- system @diff, $tw, $to
+ system "sed 's: .*/: :' $to > $tos";
+ system @diff, $tw, $tos
and fail $test->{NAME}, 'tag:diff';
print "." unless $targets{verbose};
$diff_ascii = $targets{ascii};
@@ -309,8 +310,8 @@ for my $test (@regress_tests) {
print "." unless $targets{verbose};
}
if ($targets{clean}) {
- print "rm $o $to $m $mo\n" if $targets{verbose};
- $count_rm += unlink $o, $to, $m, $mo;
+ print "rm $o $to $tos $m $mo\n" if $targets{verbose};
+ $count_rm += unlink $o, $to, $tos, $m, $mo;
}
}
if ($targets{ascii} || $targets{tag} || $targets{man}) {