xref: /csrg-svn/old/dbx/tests/check (revision 44052)
1*44052Sbostic#! /bin/csh -f
2*44052Sbostic
3*44052Sbostic#
4*44052Sbostic# check <test output> <expected output>
5*44052Sbostic#
6*44052Sbostic# Check to see if test output matches expected output.
7*44052Sbostic# If not, run diff and ask if differences are "ok".  If so,
8*44052Sbostic# install new output as expected output.
9*44052Sbostic#
10*44052Sbostic
11*44052Sbosticcmp -s $1 $2
12*44052Sbosticif ($status != 0) then
13*44052Sbostic    diff $1 $2
14*44052Sbostic    echo -n "ok? "
15*44052Sbostic    if ($< != y) then
16*44052Sbostic	exit 1
17*44052Sbostic    endif
18*44052Sbostic    mv $1 $2
19*44052Sbosticendif
20*44052Sbosticexit 0
21