summaryrefslogtreecommitdiffstats
path: root/regress
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@netbsd.org>2010-05-16 18:10:24 +0000
committerJoerg Sonnenberger <joerg@netbsd.org>2010-05-16 18:10:24 +0000
commitf20ec3ad8a63200ea468d6350f96622a33060719 (patch)
tree69be3c78f0effea9690edeaf0520a0bd4e41ef79 /regress
parent49cfaaa4db05243fdd74b3b6deb9aba06bf2402f (diff)
downloadmandoc-f20ec3ad8a63200ea468d6350f96622a33060719.tar.gz
Fully skip first and last line for the purpose of cmp.
Diffstat (limited to 'regress')
-rwxr-xr-xregress/regress.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/regress/regress.sh b/regress/regress.sh
index 9a98c498..24048b34 100755
--- a/regress/regress.sh
+++ b/regress/regress.sh
@@ -23,9 +23,11 @@ for file in */*.in */*/*.in; do
printf "%s: " "$file"
${MANDOC} "$file" > test.mandoc 2> /dev/null
${NROFF} ${OUTPUT} -mandoc "$file" > test.nroff 2> /dev/null
- mandoclen=`head -n 1 test.mandoc | wc -c`
- nrofflen=`head -n 1 test.nroff | wc -c`
- if cmp -s test.mandoc test.nroff $mandoclen $nrofflen; then
+ l=`wc -l < test.mandoc`
+ head -n `expr $l - 1` test.mandoc | tail -n `expr $l - 2` > test.mandoc_
+ l=`wc -l < test.nroff`
+ head -n `expr $l - 1` test.nroff| tail -n `expr $l - 2` > test.nroff_
+ if cmp -s test.mandoc_ test.nroff_; then
rm -f test.mandoc test.nroff
echo "passed"
pass=`expr $pass + 1`
@@ -39,4 +41,5 @@ for file in */*.in */*/*.in; do
diff -u "${file2}".nroff "${file2}".mandoc > "${file2}".diff
fi
done
+rm -f test.mandoc_ test.nroff_
echo "Total: $pass passed, $failed failed"