head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.1
	netbsd-11-0-RC3:1.1.1.1
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	netbsd-11:1.1.1.1.0.4
	netbsd-11-base:1.1.1.1
	xauth-1-1-4:1.1.1.1
	netbsd-10-1-RELEASE:1.1.1.1
	xauth-1-1-3:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.1
	netbsd-10-0-RC6:1.1.1.1
	netbsd-10-0-RC5:1.1.1.1
	netbsd-10-0-RC4:1.1.1.1
	netbsd-10-0-RC3:1.1.1.1
	netbsd-10-0-RC2:1.1.1.1
	netbsd-10-0-RC1:1.1.1.1
	netbsd-10:1.1.1.1.0.2
	netbsd-10-base:1.1.1.1
	xauth-1-1-2:1.1.1.1
	xorg:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2022.07.11.09.08.10;	author mrg;	state Exp;
branches
	1.1.1.1;
next	;
commitid	AepSo9vWGwNgosLD;

1.1.1.1
date	2022.07.11.09.08.10;	author mrg;	state Exp;
branches;
next	;
commitid	AepSo9vWGwNgosLD;


desc
@@


1.1
log
@Initial revision
@
text
@#!/bin/sh

# This script is modelled after cmdtest:
#   it takes all *.scripts and executes them and saves the stdout/err
#   This output is compared against *.stdout/stderr.
#   If no difference is found, the test is assumed as PASS (otherwise FAIL)
#
total_ret=0
testsrc="${srcdir:-.}"
for script in `ls -1 ${testsrc}/*.script | sort` ; do
	base=`basename $script .script`
	echo "Testing $base"
        $script > out.stdout 2> out.stderr

	# check stdout for correctness
	if [ -f ${testsrc}/$base.stdout ]; then
		diff out.stdout ${testsrc}/$base.stdout
		ret_stdout=$?
	else
		ret_stdout=0
	fi

	# check stderr for correctness
	if [ -f ${testsrc}/$base.stderr ]; then
		diff out.stderr ${testsrc}/$base.stderr
		ret_stderr=$?
	else
		if [ -s out.stderr ] ; then
			diff out.stderr /dev/null
			ret_stderr=1
		else
			ret_stderr=0
		fi
	fi

	if [ $ret_stdout -eq 0 -a $ret_stderr -eq 0 ]; then
		echo "OK"
	else
		echo "FAIL"
		total_ret=1
	fi
done

exit $total_ret
@


1.1.1.1
log
@initial import of xauth-1.1.2
@
text
@@
