top_builddir=`cd $top_builddir; pwd`
PSPP=$top_builddir/src/ui/terminal/pspp
-export STAT_CONFIG_PATH=$top_srcdir/config
+STAT_CONFIG_PATH=$top_srcdir/config
+export STAT_CONFIG_PATH
cleanup()
echo "NOT cleaning $TEMPDIR"
return ;
fi
+ cd /
rm -rf $TEMPDIR
}
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program 0"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii -e /dev/null $TESTFILE
+$SUPERVISOR $PSPP --testing-mode -e /dev/null $TESTFILE
if [ $? -ne 0 ] ; then fail ; fi
activity="compare variable display 0"
|Variable|Description |Position|
#========#===========================================#========#
|N |Format: F8.2 | 1|
+| |Measure: Scale | |
+| |Display Alignment: Right | |
+| |Display Width: 10 | |
+--------+-------------------------------------------+--------+
|A255 |Format: A255 | 2|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 32 | |
+--------+-------------------------------------------+--------+
|A258 |Format: A258 | 3|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 32 | |
+--------+-------------------------------------------+--------+
|A2000 |Format: A2000 | 4|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 32 | |
+--------+-------------------------------------------+--------+
N A255 A258 A2000
-------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|Variable|Description |Position|
#========#===========================================#========#
|vl255 |Format: A255 | 1|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 26 | |
+--------+-------------------------------------------+--------+
|vl256 |Format: A256 | 2|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 26 | |
+--------+-------------------------------------------+--------+
|vl1335 |Format: A1335 | 3|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 26 | |
+--------+-------------------------------------------+--------+
|vl2000 |Format: A2000 | 4|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 26 | |
+--------+-------------------------------------------+--------+
vl255 vl256 vl1335 vl2000
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="Create file1"
-cat > $TESTFILE <<EOF
+for options in uncompressed compressed; do
+ activity="Create file1 ($options)"
+ cat > $TESTFILE <<EOF
DATA LIST FIXED FILE='$TEMPDIR/data' /a 2-11 (a)
b (a256)
c (a200)
.
-SAVE OUTFILE='$TEMPDIR/foo.sav' /UNCOMPRESSED.
+SAVE OUTFILE='$TEMPDIR/foo.sav' /$options.
EOF
-if [ $? -ne 0 ] ; then no_result ; fi
+ if [ $? -ne 0 ] ; then no_result ; fi
+ activity="run program 1 ($options)"
+ $SUPERVISOR $PSPP --testing-mode $TESTFILE
+ if [ $? -ne 0 ] ; then no_result ; fi
-activity="run program 1"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="Create file2"
-cat > $TESTFILE <<EOF
+ activity="Create file2 ($options)"
+ cat > $TESTFILE <<EOF
GET FILE='$TEMPDIR/foo.sav'.
EXECUTE.
EOF
-if [ $? -ne 0 ] ; then no_result ; fi
+ if [ $? -ne 0 ] ; then no_result ; fi
-activity="run program 2"
-$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE
-if [ $? -ne 0 ] ; then no_result ; fi
+ activity="run program 2 ($options)"
+ $SUPERVISOR $PSPP --testing-mode $TESTFILE
+ if [ $? -ne 0 ] ; then no_result ; fi
# Check that the file read back in has the same data as what we wrote.
-activity="compare print"
-diff -b $TEMPDIR/out.txt $TEMPDIR/data
-if [ $? -ne 0 ] ; then fail ; fi
+ activity="compare print ($options)"
+ diff -b $TEMPDIR/out.txt $TEMPDIR/data
+ if [ $? -ne 0 ] ; then fail ; fi
-activity="compare variable display"
-perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
-diff -b $TEMPDIR/pspp.list - <<EOF
+ activity="compare variable display ($options)"
+ perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
+ diff -b $TEMPDIR/pspp.list - <<EOF
1.1 DISPLAY.
+--------+-------------------------------------------+--------+
|Variable|Description |Position|
#========#===========================================#========#
|a |Format: A10 | 1|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 10 | |
+--------+-------------------------------------------+--------+
|b |Format: A256 | 2|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 32 | |
+--------+-------------------------------------------+--------+
|c |Format: A200 | 3|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 32 | |
+--------+-------------------------------------------+--------+
|d |Format: A32767 | 4|
+| |Measure: Nominal | |
+| |Display Alignment: Left | |
+| |Display Width: 32 | |
+--------+-------------------------------------------+--------+
EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
+ if [ $? -ne 0 ] ; then fail ; fi
+done
pass;