File indexing completed on 2024-12-22 04:26:48
0001 #!/bin/sh 0002 0003 # sqltest - fast parser testing using sqlite database. 0004 # Type sqltest --help for usage info. 0005 # Copyright (C) 2004-2016 Jaroslaw Staniek <staniek@kde.org> 0006 0007 apppath=`realpath $0` 0008 app=`basename $apppath` 0009 [ $# -lt 1 ] && echo "Usage: $app <sqlite-database-name> \"<sql-statement>\" [-v] [other_options]" && \ 0010 echo " -v Verbose mode" && exit 1 0011 0012 dbname=$1 0013 shift 0014 0015 sql=$1 0016 shift 0017 0018 verbose=0 0019 if [ "$1" = "-v" ] ; then 0020 verbose=1 0021 shift 0022 fi 0023 0024 temp=`mktemp /tmp/$app.XXXXXX` 0025 0026 ./kdbfeaturestest --test parser sqlite "$dbname" "$sql" $* 2> $temp || \ 0027 cat $temp && test "$verbose" -eq 1 && cat $temp 0028 0029 rm -f $temp