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 diff -B -b $TEMPDIR/pspp.list - <<EOF
75 1.1 DATA LIST. Reading free-form data from the command file.
76 +--------------+------+
78 #==============#======#
79 |AlphaBetaGamma|F8.0 |
82 |Yabbadabbadoo |F8.0 |
83 +--------------+------+
85 AlphaBetaGamma B X Yabbadabbadoo
86 -------------- -------- -------- -------------
89 2.1 CROSSTABS. Summary.
90 #===============#=====================================================#
92 # #-----------------+-----------------+-----------------#
93 # # Valid | Missing | Total #
94 # #--------+--------+--------+--------+--------+--------#
95 # # N| Percent| N| Percent| N| Percent#
96 #---------------#--------+--------+--------+--------+--------+--------#
97 #X * # 1| 100.0%| 0| 0.0%| 1| 100.0%#
98 #Yabbadabbadoo # | | | | | #
99 #===============#========#========#========#========#========#========#
101 2.2 CROSSTABS. X by Yabbadabbadoo [count].
102 #===============#==============================================================#========#
103 # # Yabbadabbadoo | #
104 # #--------+--------+--------+--------+--------+--------+--------+ #
105 # X# 1.00| 2.00| 3.00| 4.00| 5.00| 6.00| 7.00| Total #
106 #---------------#--------+--------+--------+--------+--------+--------+--------+--------#
107 # 1.00# .0| .0| .0| .0| .0| .0| .0| .0#
108 # 2.00# .0| .0| .0| .0| .0| .0| .0| .0#
109 # 3.00# .0| .0| .0| .0| .0| .0| .0| .0#
110 # 4.00# .0| .0| .0| .0| 1.0| .0| .0| 1.0#
111 # 5.00# .0| .0| .0| .0| .0| .0| .0| .0#
112 # 6.00# .0| .0| .0| .0| .0| .0| .0| .0#
113 # 7.00# .0| .0| .0| .0| .0| .0| .0| .0#
114 #Total # .0%| .0%| .0%| .0%| 1.0%| .0%| .0%| 1.0%#
115 #===============#========#========#========#========#========#========#========#========#
118 if [ $? -ne 0 ] ; then fail ; fi