dbsql/test/scr014/chk.err

33 lines
658 B
Text
Raw Normal View History

2007-03-10 19:04:07 +00:00
#!/bin/sh -
#
# Check to make sure all of the error values have corresponding error
# message strings in db_strerror().
# Top-level directory.
d=../..
# Path names are from a top-level directory.
[ -f $d/README ] || {
echo 'FAIL: cannot find source distribution directory.'
exit 1
}
t1=__1
t2=__2
egrep -- "define.*DBSQL_.*-509" $d/src/dbsql.in | awk '{print $2}' > $t1
sed -e '/^dbsql_strerror/,/^}/{' \
-e '/ case DBSQL_/{' \
-e 's/:.*//' \
-e 's/.* //' \
-e p \
-e '}' \
-e '}' \
-e d \
< $d/src/common/dbsql_err.c > $t2
cmp $t1 $t2 > /dev/null ||
(echo "<<< db.h >>> db_strerror" && diff $t1 $t2 && exit 1)
exit 0