3 # This program tests that the descriptives command actually works
5 TEMPDIR=/tmp/pspp-tst-$$
9 # ensure that top_srcdir is absolute
10 cd $top_srcdir; top_srcdir=`pwd`
12 export STAT_CONFIG_PATH=$top_srcdir/config
48 activity="create program"
49 cat > $TEMPDIR/descript.stat <<EOF
50 title 'Test DESCRIPTIVES procedure'.
52 data list / v0 to v16 1-17.
66 descript all/stat=all/format=serial.
69 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="run program"
73 $here/../src/pspp -o raw-ascii $TEMPDIR/descript.stat
74 if [ $? -ne 0 ] ; then no_result ; fi
77 activity="compare output"
78 diff -B -b $TEMPDIR/pspp.list - <<EOF
79 1.1 DATA LIST. Reading 1 record from the command file.
80 +--------+------+-------+------+
81 |Variable|Record|Columns|Format|
82 #========#======#=======#======#
92 |V9 | 1| 10- 10|F1.0 |
93 |V10 | 1| 11- 11|F1.0 |
94 |V11 | 1| 12- 12|F1.0 |
95 |V12 | 1| 13- 13|F1.0 |
96 |V13 | 1| 14- 14|F1.0 |
97 |V14 | 1| 15- 15|F1.0 |
98 |V15 | 1| 16- 16|F1.0 |
99 |V16 | 1| 17- 17|F1.0 |
100 +--------+------+-------+------+
102 2.1(1) DESCRIPTIVES. Valid cases = 10; cases with missing value(s) = 0.
103 +--------#-------+---------+-----+--------+-------+--------+--------+--------+
104 |Variable#Valid N|Missing N| Mean|S E Mean|Std Dev|Variance|Kurtosis|S E Kurt|
105 #========#=======#=========#=====#========#=======#========#========#========#
106 |V0 # 10| 0|3.800| .841| 2.658| 7.067| -.035| 1.334|
107 |V1 # 10| 0|4.600| .957| 3.026| 9.156| -1.386| 1.334|
108 |V2 # 10| 0|4.100| 1.159| 3.665| 13.433| -2.019| 1.334|
109 |V3 # 10| 0|4.100| .875| 2.767| 7.656| -2.049| 1.334|
110 |V4 # 10| 0|7.000| .471| 1.491| 2.222| 7.152| 1.334|
111 |V5 # 10| 0|4.900| 1.027| 3.247| 10.544| -1.401| 1.334|
112 |V6 # 10| 0|5.900| .795| 2.514| 6.322| -.290| 1.334|
113 |V7 # 10| 0|4.700| 1.096| 3.466| 12.011| -1.993| 1.334|
114 |V8 # 10| 0|4.100| 1.100| 3.479| 12.100| -1.928| 1.334|
115 |V9 # 10| 0|4.300| .870| 2.751| 7.567| -.875| 1.334|
116 |V10 # 10| 0|5.500| .847| 2.677| 7.167| -1.842| 1.334|
117 |V11 # 10| 0|6.500| .778| 2.461| 6.056| -1.276| 1.334|
118 |V12 # 10| 0|7.900| .605| 1.912| 3.656| 5.241| 1.334|
119 |V13 # 10| 0|4.300| .989| 3.129| 9.789| -1.248| 1.334|
120 |V14 # 10| 0|3.600| 1.013| 3.204| 10.267| -.961| 1.334|
121 |V15 # 10| 0|3.700| .920| 2.908| 8.456| -1.352| 1.334|
122 |V16 # 10| 0|6.400| .909| 2.875| 8.267| -1.142| 1.334|
123 +--------#-------+---------+-----+--------+-------+--------+--------+--------+
125 2.1(2) DESCRIPTIVES. Valid cases = 10; cases with missing value(s) = 0.
126 +--------#--------+--------+-----+-------+-------+------+
127 |Variable#Skewness|S E Skew|Range|Minimum|Maximum| Sum |
128 #========#========#========#=====#=======#=======#======#
129 |V0 # .889| .687|8.000| 1.000| 9.000|38.000|
130 |V1 # -.032| .687|9.000| .000| 9.000|46.000|
131 |V2 # .476| .687|8.000| 1.000| 9.000|41.000|
132 |V3 # .422| .687|7.000| 1.000| 8.000|41.000|
133 |V4 # -2.516| .687|5.000| 3.000| 8.000|70.000|
134 |V5 # -.205| .687|9.000| .000| 9.000|49.000|
135 |V6 # -.960| .687|7.000| 1.000| 8.000|59.000|
136 |V7 # -.165| .687|9.000| .000| 9.000|47.000|
137 |V8 # .371| .687|9.000| .000| 9.000|41.000|
138 |V9 # .730| .687|8.000| 1.000| 9.000|43.000|
139 |V10 # -.326| .687|7.000| 2.000| 9.000|55.000|
140 |V11 # -.895| .687|6.000| 3.000| 9.000|65.000|
141 |V12 # -2.208| .687|6.000| 3.000| 9.000|79.000|
142 |V13 # .333| .687|9.000| .000| 9.000|43.000|
143 |V14 # .809| .687|9.000| .000| 9.000|36.000|
144 |V15 # .710| .687|7.000| 1.000| 8.000|37.000|
145 |V16 # -.923| .687|7.000| 2.000| 9.000|64.000|
146 +--------#--------+--------+-----+-------+-------+------+
148 if [ $? -ne 0 ] ; then fail ; fi