3 # This program tests that both long and short variable names are parsed OK.
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 # Use crosstabs, since its TABLES subcommand exercises the array var set
53 activity="create program"
55 DATA LIST LIST /AlphaBetaGamma * B * X * Yabbadabbadoo * .
63 VARIABLES X (1,7) Yabbadabbadoo (1,7)
64 /TABLES X BY Yabbadabbadoo.
66 if [ $? -ne 0 ] ; then no_result ; fi
69 activity="run program"
70 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
71 if [ $? -ne 0 ] ; then no_result ; fi
73 activity="compare output"
74 perl -pi -e s/^\s*\$//g $TEMPDIR/pspp.list
75 diff -b $TEMPDIR/pspp.list - <<EOF | perl -e 's/^\s*$//g'
76 1.1 DATA LIST. Reading free-form data from the command file.
77 +--------------+------+
79 #==============#======#
80 |AlphaBetaGamma|F8.0 |
83 |Yabbadabbadoo |F8.0 |
84 +--------------+------+
86 AlphaBetaGamma B X Yabbadabbadoo
87 -------------- -------- -------- -------------
90 2.1 CROSSTABS. Summary.
91 #===============#=====================================================#
93 # #-----------------+-----------------+-----------------#
94 # # Valid | Missing | Total #
95 # #--------+--------+--------+--------+--------+--------#
96 # # N| Percent| N| Percent| N| Percent#
97 #---------------#--------+--------+--------+--------+--------+--------#
98 #X * # 1| 100.0%| 0| 0.0%| 1| 100.0%#
99 #Yabbadabbadoo # | | | | | #
100 #===============#========#========#========#========#========#========#
102 2.2 CROSSTABS. X by Yabbadabbadoo [count].
103 #===============#==============================================================#========#
104 # # Yabbadabbadoo | #
105 # #--------+--------+--------+--------+--------+--------+--------+ #
106 # X# 1.00| 2.00| 3.00| 4.00| 5.00| 6.00| 7.00| Total #
107 #---------------#--------+--------+--------+--------+--------+--------+--------+--------#
108 # 1.00# .0| .0| .0| .0| .0| .0| .0| .0#
109 # 2.00# .0| .0| .0| .0| .0| .0| .0| .0#
110 # 3.00# .0| .0| .0| .0| .0| .0| .0| .0#
111 # 4.00# .0| .0| .0| .0| 1.0| .0| .0| 1.0#
112 # 5.00# .0| .0| .0| .0| .0| .0| .0| .0#
113 # 6.00# .0| .0| .0| .0| .0| .0| .0| .0#
114 # 7.00# .0| .0| .0| .0| .0| .0| .0| .0#
115 #Total # .0%| .0%| .0%| .0%| 1.0%| .0%| .0%| 1.0%#
116 #===============#========#========#========#========#========#========#========#========#
119 if [ $? -ne 0 ] ; then fail ; fi