environ \
exit \
fatal-signal \
+ fcntl \
fpieee \
fprintf-posix \
full-read \
If more than two distinct, non-missing values for a variable
under test are encountered then an error occurs.
-If the test proportion is equal to 0.5, then a one tailed test is
+If the test proportion is equal to 0.5, then a two tailed test is
reported. For any other test proportion, a one tailed test is
reported.
For one tailed tests, if the test proportion is less than
}
/* Create file by that name. */
- fd = open (rf->tmp_name, O_WRONLY | O_CREAT | O_EXCL, permissions);
+ fd = open (rf->tmp_name, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, permissions);
if (fd >= 0)
break;
if (errno != EEXIST)
char buffer[64];
format_trig_double (d, floor (d) == d ? DBL_DIG : w->digits, buffer);
buf_write (w, buffer, strlen (buffer));
- buf_write (w, "/", 1);
+ if (d != SYSMIS)
+ buf_write (w, "/", 1);
}
/* Write N to the portable file as an integer field. */
break;
}
+ if ( width == 0 && fmt_is_string (fmt.type))
+ fmt.w = width = MAX_SHORT_STRING;
+
+
var = create_var (r, &fmt, width, PQfname (qres, i), i);
if ( type == NUMERICOID && n_tuples > 0)
{
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 <<EOF
+GET DATA /TYPE=psql
+ /CONNECT="host=$TEMPDIR port=$port dbname=$dbase"
+ /UNENCRYPTED
+ /SQL="select * from foo".
+
+DISPLAY DICTIONARY.
+
+LIST.
+EOF
+if [ $? -ne 0 ] ; then no_result ; fi
+
+
+activity="run program 4"
+$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
+if [ $? -ne 0 ] ; then no_result ; fi
+
+
pass;
DATA LIST LIST NOTABLE /X Y.
BEGIN DATA.
1 2
-3 4
+3 .
5 6
END DATA.
X Y
-------- --------
1.00 2.00
- 3.00 4.00
+ 3.00 .
5.00 6.00
EOF
if [ $? -ne 0 ] ; then fail ; fi