X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fget-data-psql.sh;h=1d8afadaa815f2ece469e7d488845844540f8951;hb=d6a7921fd7f10c29f8bd22064a08e98fde240172;hp=e47b5af7113275c4d26f0b9d2fa0115caf7570c3;hpb=7154ba03964f5edfc321b7625a3ed3524d54a38c;p=pspp-builds.git diff --git a/tests/command/get-data-psql.sh b/tests/command/get-data-psql.sh index e47b5af7..1d8afada 100755 --- a/tests/command/get-data-psql.sh +++ b/tests/command/get-data-psql.sh @@ -31,6 +31,7 @@ cleanup() return ; fi PGHOST=$TEMPDIR $pgpath/pg_ctl -D $TEMPDIR/cluster stop -W -o "-k $TEMPDIR -h ''" > /dev/null 2>&1 + cd / rm -rf $TEMPDIR } @@ -426,4 +427,44 @@ diff -b $TEMPDIR/pspp.list - << 'EOF' EOF if [ $? -ne 0 ] ; then fail ; fi + + +# Check for a bug caused by having string variables in the database, +# all of which are null. + +activity="populate database 4" +$pgpath/psql -h $TEMPDIR -p $port $dbase > /dev/null << EOF + +-- a table which has a text field containing only null, or zero +-- length entries. + +CREATE TABLE foo (int4 int4, text text); + +INSERT INTO foo VALUES ('12', ''); + +INSERT INTO foo VALUES (null, ''); + +EOF +if [ $? -ne 0 ] ; then fail ; fi + + +activity="create program 4" +cat > $TESTFILE <