You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koffice/kexi/tests/newapi/sqltest

28 lines
549 B

#!/bin/sh
# sqltest - fast parser testing using sqlite database.
# Type sqltest --help for usage info.
# Copyright (C) 2004, 2006 Jaroslaw Staniek <js@iidea.pl>
[ $# -lt 1 ] && echo "Usage: $0 <sqlite-database-name> <sql-statement> [-v] [other_options]" && \
echo " -v Verbose mode" && exit 1
dbname=$1
shift
sql=$1
shift
verbose=0
if [ "$1" = "-v" ] ; then
verbose=1
shift
fi
temp=`mktemp /tmp/$0.XXXXXX`
./kexidbtest -test parser sqlite3 "$dbname" "$sql" $* 2> $temp || \
cat $temp && test "$verbose" -eq 1 && cat $temp
rm -f $temp