3 # This program tests the count transformation
5 TEMPDIR=/tmp/pspp-tst-$$
9 # ensure that top_srcdir is absolute
10 cd $top_srcdir; top_srcdir=`pwd`
12 export STAT_CONFIG_PATH=$top_srcdir/config
48 cat > $TEMPDIR/count.stat <<EOF
49 title 'Test COUNT transformation'.
51 * we're going to count the 2s 4s and 1s in the data
52 data list /v1 to v2 1-4(a).
58 1104 ---- this is not '4', but '04' (v1 and v2 are string format )
62 count c=v1 to v2('2',' 4','1').
65 if [ $? -ne 0 ] ; then no_result ; fi
68 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/count.stat
69 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="compare results"
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 #========#======#=======#======#
80 +--------+------+-------+------+
92 if [ $? -ne 0 ] ; then no_result ; fi