blob: cd63134b65a2be6ffa2517f007683910d482e3be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/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
|