3 # This program tests the flip command
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
10 # ensure that top_srcdir is absolute
11 cd $top_srcdir; top_srcdir=`pwd`
13 export STAT_CONFIG_PATH=$top_srcdir/config
49 activity="create flip.stat"
50 cat > $TEMPDIR/flip.stat <<EOF
51 data list /n 1 (a) a b c d 2-9.
65 if [ $? -ne 0 ] ; then no_result ; fi
68 activity="run program"
69 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/flip.stat
70 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="compare output"
73 diff -b -B $TEMPDIR/pspp.list - << EOF
74 1.1 DATA LIST. Reading 1 record from the command file.
75 +--------+------+-------+------+
76 |Variable|Record|Columns|Format|
77 #========#======#=======#======#
83 +--------+------+-------+------+
94 -------- -------- -------- -------- -------- --------
95 A 1.00 6.00 11.00 16.00 21.00
96 B 2.00 7.00 12.00 17.00 22.00
97 C 3.00 8.00 13.00 18.00 23.00
98 D 4.00 9.00 14.00 19.00 24.00
101 -------- -------- -------- -------- --------
102 V 1.00 2.00 3.00 4.00
103 W 6.00 7.00 8.00 9.00
104 X 11.00 12.00 13.00 14.00
105 Y 16.00 17.00 18.00 19.00
106 Z 21.00 22.00 23.00 24.00
108 if [ $? -ne 0 ] ; then fail ; fi