#!/bin/sh
# test all the basic stuff

. $TESTDIR/src/functions.sh
echo "cleaning spool dirs... "; clean-spools
echon "waiting for any active jobs... "; wait-for-daemon; echo

do_banner_test () {
    PRINTER="$1"; export PRINTER
    LPRCMD="$2"
    FILTERS="$3"
    do_test_pre $PRINTER "$FILTERS"
    case $PRINTER in
	*_hash_* )	$LPRCMD $DOC ;;
	* )		$LPRCMD $DOC; $LPRCMD $DOC; $LPRCMD $DOC
    esac
    do_test_post $PRINTER "$FILTERS"
}


if [ $# -gt 0 ] ; then
    do_banner_test $*
    exit 0
fi

do_banner_test t_bp_ep		"lpr"		bp,ep
do_banner_test t_bp_ep_nobanner	"lpr -h"
do_banner_test t_sb		"lpr"		sb
do_banner_test t_sb_nobanner	"lpr -h"
do_banner_test t_hl		"lpr"		banner
do_banner_test t_hl_nobanner	"lpr -h"
do_banner_test t_hl_sb		"lpr"		sb

do_banner_test t_hash_bp_ep		"lpr -#3"	bp,ep
do_banner_test t_hash_bp_ep_nobanner	"lpr -#3 -h"
do_banner_test t_hash_sb		"lpr -#3"	sb
do_banner_test t_hash_sb_nobanner	"lpr -#3 -h"
do_banner_test t_hash_hl		"lpr -#3"	banner
do_banner_test t_hash_hl_nobanner	"lpr -#3 -h"
do_banner_test t_hash_hl_sb		"lpr -#3"	sb

