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
50 # Use crosstabs, since its TABLES subcommand exercises the array var set
52 activity="create program"
54 DATA LIST LIST /AlphaBetaGamma * B * X * Yabbadabbadoo * .
62 VARIABLES X (1,7) Yabbadabbadoo (1,7)
63 /TABLES X BY Yabbadabbadoo.
65 if [ $? -ne 0 ] ; then no_result ; fi
68 activity="run program"
69 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
70 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="compare output"
73 diff -B -b $TEMPDIR/pspp.list - <<EOF
74 1.1 DATA LIST. Reading free-form data from the command file.
75 +--------------+------+
77 #==============#======#
78 |AlphaBetaGamma|F8.0 |
81 |Yabbadabbadoo |F8.0 |
82 +--------------+------+
84 AlphaBetaGamma B X Yabbadabbadoo
85 -------------- -------- -------- -------------
88 2.1 CROSSTABS. Summary.
89 #===============#=====================================================#
91 # #-----------------+-----------------+-----------------#
92 # # Valid | Missing | Total #
93 # #--------+--------+--------+--------+--------+--------#
94 # # N| Percent| N| Percent| N| Percent#
95 #---------------#--------+--------+--------+--------+--------+--------#
96 #X * # 1| 100.0%| 0| 0.0%| 1| 100.0%#
97 #Yabbadabbadoo # | | | | | #
98 #===============#========#========#========#========#========#========#
100 2.2 CROSSTABS. X by Yabbadabbadoo [count].
101 #===============#==============================================================#========#
102 # # Yabbadabbadoo | #
103 # #--------+--------+--------+--------+--------+--------+--------+ #
104 # X# 1.00| 2.00| 3.00| 4.00| 5.00| 6.00| 7.00| Total #
105 #---------------#--------+--------+--------+--------+--------+--------+--------+--------#
106 # 1.00# .0| .0| .0| .0| .0| .0| .0| .0#
107 # 2.00# .0| .0| .0| .0| .0| .0| .0| .0#
108 # 3.00# .0| .0| .0| .0| .0| .0| .0| .0#
109 # 4.00# .0| .0| .0| .0| 1.0| .0| .0| 1.0#
110 # 5.00# .0| .0| .0| .0| .0| .0| .0| .0#
111 # 6.00# .0| .0| .0| .0| .0| .0| .0| .0#
112 # 7.00# .0| .0| .0| .0| .0| .0| .0| .0#
113 #Total # .0%| .0%| .0%| .0%| 1.0%| .0%| .0%| 1.0%#
114 #===============#========#========#========#========#========#========#========#========#
117 if [ $? -ne 0 ] ; then fail ; fi