]>
git.cameronkatri.com Git - mandoc.git/blob - regress/regress.sh
3 MANDOC
=${MANDOC:-../mandoc}
5 OUTPUT
=${NROFF_OUTPUT:--Tascii}
9 echo "regress.sh: command not found: $MANDOC" 1>&2
14 [ -f skip_list
] || return 1
16 [ "$file" != "$1" ] || return 0
23 echo "Starting regression tests..."
26 for file in */*.
in */*/*.
in; do
27 [ -f "$file" ] || continue
28 check_skip_list
"$file" && break
30 ${MANDOC} "$file" > test.mandoc
2> /dev
/null
31 ${NROFF} ${OUTPUT} -mandoc "$file" > test.nroff
2> /dev
/null
32 l
=`wc -l < test.mandoc`
33 head -n `expr $l - 1` test.mandoc
| tail -n `expr $l - 2` > test.mandoc_
34 l
=`wc -l < test.nroff`
35 head -n `expr $l - 1` test.nroff
| tail -n `expr $l - 2` > test.nroff_
36 if cmp -s test.mandoc_
test.nroff_
; then
37 rm -f test.mandoc
test.nroff
42 mkdir -p `dirname $file2`
43 echo "failed, see $file2"
44 failed
=`expr $failed + 1`
45 mv test.nroff
"${file2}".nroff
46 mv test.mandoc
"${file2}".mandoc
47 diff -u "${file2}".nroff
"${file2}".mandoc
> "${file2}".
diff
50 rm -f test.mandoc_
test.nroff_
51 echo "Total: $pass passed, $failed failed"