3 # This program tests the autorecode command
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
11 # ensure that top_srcdir is absolute
12 cd $top_srcdir; top_srcdir=`pwd`
14 export STAT_CONFIG_PATH=$top_srcdir/config
50 activity="create program"
52 /* Tries AUTORECODE on some random but similar strings of characters.
53 data list /x 1-5(a) y 7.
56 asdfk 0 3 <---- These are the numbers that should be produced for a 4
62 asdfk 0 3 These are the numbers that should be produced for b ----> 4
66 autorecode x y into a b/descend.
69 /* Just to make sure it works on second & subsequent executions,
75 if [ $? -ne 0 ] ; then no_result ; fi
77 activity="run program"
78 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
79 if [ $? -ne 0 ] ; then no_result ; fi
81 activity="test output"
82 diff -b -B $TEMPDIR/pspp.list - <<EOF
83 1.1 DATA LIST. Reading 1 record from the command file.
84 +--------+------+-------+------+
85 |Variable|Record|Columns|Format|
86 #========#======#=======#======#
89 +--------+------+-------+------+
92 ----- - -------- --------
104 ----- - -------- -------- -------- --------
105 lasdj 1 1.00 3.00 .00 1.00
106 asdfk 0 3.00 4.00 .00 1.00
107 asdfj 2 4.00 2.00 1.00 2.00
108 asdfj 1 4.00 3.00 .00 1.00
109 asdfk 2 3.00 2.00 1.00 2.00
110 asdfj 9 4.00 1.00 4.00 3.00
111 lajks 9 2.00 1.00 4.00 3.00
112 asdfk 0 3.00 4.00 .00 1.00
113 asdfk 1 3.00 3.00 .00 1.00
115 if [ $? -ne 0 ] ; then fail ; fi