#!/bin/bash # $HeadURL$ $LastChangedRevision$ PROGNAME=${0##*/} . $(ade-config ade_share_prefix)/include/adetestsupport.sh echo "setting up environment ..." export MAN_KEEP_STDERR=1 export MANWIDTH=80 echo "setting up files ..." cat > testcmd.1.ass <<'EOF' .TH TESTCMD 1 "1 Jan 1970" .ne 5 .SH NAME testcmd \- test command .br .ne 5 .SH SYNOPSIS .B testcmd \*[ade_standard_synopsis_component] EOF cp testcmd.1.ass testcmd.1 echo "running test for non-ass file ..." adetestsupport_invert_rc "adeass --modules=ade --format=man --comment testcmd.1" echo "compiling testcmd.1.ass against 'ade' module ..." adeass --modules=ade --format=man --comment testcmd.1.ass # Show output but strip comment (containing svn revision numbers) # and settings' values, e.g. '.ds ade_prefix ...' (as these contain # /var/tmp/adetest.....) sed -r -e '/^\.\\"/d' -e 's/ds (ade_.*prefix) (\/.*)/ds \1 VARIABLE_TEXT/' testcmd.1 echo "checking that output is man-able ..." man ./testcmd.1 > /dev/null echo "showing man output ..." man ./testcmd.1 | cat # blank lines in the man page source (not the .ass) before the real content result # in 'groff -man -Tps' writing blank *pages*; this is probably because 'groff -man' # generates a page break before the page header if it is not already about to write # at the top of the page. (Imagine the case where you send *two* man pages into # *one* groff command: it *should* insert a page break!). This bug is recorded as # WP#75. echo "checking that there are no blank lines in the output ..." sed -n 's/^$/BLANK_LINE/p' ./testcmd.1 echo "all done"