]> granicus.if.org Git - postgresql/blob - src/pl/tcl/test/runtest
Re-order items, add mention of how to propose working on a TODO item.
[postgresql] / src / pl / tcl / test / runtest
1 #!/bin/sh
2
3 DBNAME=pltcl_test
4 export DBNAME
5
6 echo "**** Destroy old database $DBNAME ****"
7 dropdb $DBNAME
8
9 sleep 1
10
11 echo "**** Create test database $DBNAME ****"
12 createdb $DBNAME || exit 1
13
14 echo "**** Create procedural language pltcl ****"
15 createlang pltcl $DBNAME || exit 1
16
17 echo "**** Create tables, functions and triggers ****"
18 psql -q -n $DBNAME <test_setup.sql
19
20 echo "**** Running test queries ****"
21 psql -q -n -e $DBNAME <test_queries.sql > test.out 2>&1
22
23 if diff test.expected test.out >/dev/null 2>&1 ; then
24     echo "    Tests passed O.K."
25     rm test.out
26 else
27     echo "    Tests failed - look at diffs between"
28     echo "    test.expected and test.out"
29 fi
30