#! /bin/sh # $NetBSD: test-simple,v 1.4.10.2 2019/06/12 10:32:00 martin Exp $ test="$1"; shift bozohttpd="$1"; shift datadir="$1"; shift curdir="$1"; shift verbose="$1"; shift in="$curdir/$test.in" out="$curdir/$test.out" tmpout="tmp.$test.out" tmperr="tmp.$test.err" if [ "yes" = "$verbose" ]; then echo "Running test $test" else exec 2>"$tmperr" fi bozotestport=11111 ${bozohttpd} "$@" "${datadir}" < "$in" > "$tmpout" if "$curdir/html_cmp" cmp "$out" "$tmpout"; then exit 0 else if [ "yes" = "$verbose" ]; then echo "Failed test $test:" cat "$tmperr" $curdir/html_cmp diff "$out" "$tmpout" fi exit 1 fi