Removed line numbers from the SQL scripts output.
[gnucomo.git] / test / t0004.sh
1 #!/bin/sh
2
3 #
4 #  Create an object 'kithira.andromeda.nl' in the database and
5 #  try to parse a piece of a syslog file without specifying the hostname.
6 #  The message should be rejected on account of an unknown host.
7
8 cd ..
9
10 if psql gnucomo_test -q <src/database/create.sql >/dev/null
11 then
12    psql gnucomo_test -q -c "insert into object (objectname) values ('kithira.andromeda.nl')"
13    psql gnucomo_test -c "select * from object"
14    src/gcm_input/gcm_input -c gnucomo_test  <test/messages
15    psql gnucomo_test -c "select * from log"
16    psql gnucomo_test -f src/database/destroy.sql -q
17    exit $result
18 else
19    echo Can not create test database
20    exit 1
21 fi