2017-01-19 21:44:22 +01:00
|
|
|
setup_database() {
|
|
|
|
cat schema/{tables.sql,*/*} | sqlite3 $1
|
|
|
|
}
|
|
|
|
|
2016-07-04 20:21:47 +02:00
|
|
|
echo "My database file: $1"
|
2017-01-19 21:44:22 +01:00
|
|
|
if setup_database $1; then
|
2017-01-15 22:03:06 +01:00
|
|
|
diff t/schema.out <(sqlite3 $1 < t/schema.sql 2>&1) \
|
2017-01-19 21:44:22 +01:00
|
|
|
&& rm $1 && setup_database $1 \
|
2017-01-15 22:03:06 +01:00
|
|
|
&& TRSRDB_SQLITE_FILE=$1 perl t/schema.t \
|
|
|
|
&& rm -i $1
|
2016-07-04 20:21:47 +02:00
|
|
|
fi
|