dbsql/test/scr014/chk.err
Gregory Burd c39ba47f61 Finished a pass over all the non-SQLite derrived tests (which all
live in scr050) and brought them up to date, some minor fixes along
the way.  A few tests don't work properly, I've noted those in the
TODO file for some other time.
2009-09-01 19:21:41 -04:00

34 lines
697 B
Bash

#!/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
trap 'rm -f $t1 $t2' 0 1 2 3 13 15
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 "<<< dbsql.h >>> db_strerror" && diff $t1 $t2 && exit 1)
exit 0