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
8 # ensure that top_builddir are absolute
9 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
10 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
11 top_builddir=`cd $top_builddir; pwd`
12 PSPP=$top_builddir/src/ui/terminal/pspp
14 # ensure that top_srcdir is absolute
15 top_srcdir=`cd $top_srcdir; pwd`
17 STAT_CONFIG_PATH=$top_srcdir/config
18 export STAT_CONFIG_PATH
57 # Use crosstabs, since its TABLES subcommand exercises the array var set
59 activity="create program"
61 DATA LIST LIST /AlphaBetaGamma * B * X * Yabbadabbadoo * .
69 VARIABLES X (1,7) Yabbadabbadoo (1,7)
70 /TABLES X BY Yabbadabbadoo.
72 if [ $? -ne 0 ] ; then no_result ; fi
75 activity="run program"
76 $SUPERVISOR $PSPP -o raw-ascii $TESTFILE
77 if [ $? -ne 0 ] ; then no_result ; fi
79 activity="compare output"
80 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
81 diff -b $TEMPDIR/pspp.list - <<EOF
82 1.1 DATA LIST. Reading free-form data from INLINE.
83 +--------------+------+
85 #==============#======#
86 |AlphaBetaGamma|F8.0 |
89 |Yabbadabbadoo |F8.0 |
90 +--------------+------+
91 AlphaBetaGamma B X Yabbadabbadoo
92 -------------- -------- -------- -------------
94 2.1 CROSSTABS. Summary.
95 #===============#=====================================================#
97 # #-----------------+-----------------+-----------------#
98 # # Valid | Missing | Total #
99 # #--------+--------+--------+--------+--------+--------#
100 # # N| Percent| N| Percent| N| Percent#
101 #---------------#--------+--------+--------+--------+--------+--------#
102 #X * # 1| 100.0%| 0| 0.0%| 1| 100.0%#
103 #Yabbadabbadoo # | | | | | #
104 #===============#========#========#========#========#========#========#
105 2.2 CROSSTABS. X by Yabbadabbadoo [count].
106 #===============#==============================================================#========#
107 # # Yabbadabbadoo | #
108 # #--------+--------+--------+--------+--------+--------+--------+ #
109 # X# 1.00| 2.00| 3.00| 4.00| 5.00| 6.00| 7.00| Total #
110 #---------------#--------+--------+--------+--------+--------+--------+--------+--------#
111 # 1.00# .0| .0| .0| .0| .0| .0| .0| .0#
112 # 2.00# .0| .0| .0| .0| .0| .0| .0| .0#
113 # 3.00# .0| .0| .0| .0| .0| .0| .0| .0#
114 # 4.00# .0| .0| .0| .0| 1.0| .0| .0| 1.0#
115 # 5.00# .0| .0| .0| .0| .0| .0| .0| .0#
116 # 6.00# .0| .0| .0| .0| .0| .0| .0| .0#
117 # 7.00# .0| .0| .0| .0| .0| .0| .0| .0#
118 #Total # .0%| .0%| .0%| .0%| 1.0%| .0%| .0%| 1.0%#
119 #===============#========#========#========#========#========#========#========#========#
121 if [ $? -ne 0 ] ; then fail ; fi