X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fget-data-psql.sh;h=1d8afadaa815f2ece469e7d488845844540f8951;hb=18e5609ea65b59f38fcd681f8555775f2e5b7ccd;hp=fa61d6d684db5ee9ea1060ad6f6dd69cc31f2666;hpb=849f1db3053e27a2879542ffebddb55909ce26ae;p=pspp-builds.git diff --git a/tests/command/get-data-psql.sh b/tests/command/get-data-psql.sh index fa61d6d6..1d8afada 100755 --- a/tests/command/get-data-psql.sh +++ b/tests/command/get-data-psql.sh @@ -427,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 <