3 # This program tests the count transformation
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
50 title 'Test COUNT transformation'.
52 * we're going to count the 2s 4s and 1s in the data
53 data list /V1 to V2 1-4(a).
59 1104 ---- this is not '4', but '04' (v1 and v2 are string format )
63 count C=v1 to v2('2',' 4','1').
66 if [ $? -ne 0 ] ; then no_result ; fi
69 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
70 if [ $? -ne 0 ] ; then no_result ; fi
73 activity="compare results"
74 diff -b -B $TEMPDIR/pspp.list - <<EOF
75 1.1 DATA LIST. Reading 1 record from the command file.
76 +--------+------+-------+------+
77 |Variable|Record|Columns|Format|
78 #========#======#=======#======#
81 +--------+------+-------+------+
93 if [ $? -ne 0 ] ; then no_result ; fi