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 STAT_CONFIG_PATH=$top_srcdir/config
14 export STAT_CONFIG_PATH
51 title 'Test COUNT transformation'.
53 * we're going to count the 2s 4s and 1s in the data
54 data list /V1 to V2 1-4(a).
60 1104 ---- this is not '4', but '04' (v1 and v2 are string format )
64 count C=v1 to v2('2',' 4','1').
67 if [ $? -ne 0 ] ; then no_result ; fi
70 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
71 if [ $? -ne 0 ] ; then no_result ; fi
74 activity="compare results"
75 diff -b -B $TEMPDIR/pspp.list - <<EOF
76 1.1 DATA LIST. Reading 1 record from the command file.
77 +--------+------+-------+------+
78 |Variable|Record|Columns|Format|
79 #========#======#=======#======#
82 +--------+------+-------+------+
94 if [ $? -ne 0 ] ; then no_result ; fi