FREQUENCIES and layered split file has tests that work
[pspp] / tests / language / stats / examine.at
index ed7dada4e129df486c1c11558ac7d3190aa41b73..bea69dd354d06303f7a71c2f25cbf0f001bb4580 100644 (file)
@@ -115,9 +115,9 @@ Breaking Strain,Mean,,3.54,.32
 ,Kurtosis,,-.36,.92
 
 Table: Case Processing Summary
-,,Cases,,,,,
+,Manufacturer,Cases,,,,,
 ,,Valid,,Missing,,Total,
-,Manufacturer,N,Percent,N,Percent,N,Percent
+,,N,Percent,N,Percent,N,Percent
 Breaking Strain,Aspeger,8.00,100.0%,.00,.0%,8.00,100.0%
 ,Bloggs,8.00,100.0%,.00,.0%,8.00,100.0%
 ,Charlies,8.00,100.0%,.00,.0%,8.00,100.0%
@@ -451,9 +451,9 @@ Table: Case Processing Summary
 x,6,85.7%,1,14.3%,7,100.0%
 
 Table: Case Processing Summary
-,,Cases,,,,,
+,y,Cases,,,,,
 ,,Valid,,Missing,,Total,
-,y,N,Percent,N,Percent,N,Percent
+,,N,Percent,N,Percent,N,Percent
 x,1.00,4,100.0%,0,.0%,4,100.0%
 ,2.00,2,66.7%,1,33.3%,3,100.0%
 ])
@@ -678,11 +678,10 @@ dnl Another test that big input doesn't crash.
 dnl The actual bug that this checks for has been lost.
 AT_SETUP([EXAMINE -- big input doesn't crash 2])
 AT_KEYWORDS([categorical categoricals slow])
-AT_DATA([make-big-input.pl],
-  [for ($i=0; $i<100000; $i++) { print "AB12\n" };
-   for ($i=0; $i<100000; $i++) { print "AB04\n" };
-])
-AT_CHECK([$PERL make-big-input.pl > large.txt])
+AT_CHECK([$PYTHON3 -c '
+for i in range(100000): print("AB12")
+for i in range(100000): print("AB04")
+' > large.txt])
 AT_DATA([examine.sps], [dnl
 DATA LIST FILE='large.txt' /S 1-2 (A) X 3 .
 
@@ -694,10 +693,7 @@ EXAMINE /A BY X.
 ])
 AT_CHECK([pspp -o pspp.csv examine.sps])
 dnl Ignore output -- this is just a no-crash check.
-AT_DATA([more-big-input.pl],
-  [for ($i=0; $i<25000; $i++) { print "AB04\nAB12\n" };
-])
-AT_CHECK([$PERL more-big-input.pl >> large.txt])
+AT_CHECK([$PYTHON3 -c 'for i in range(25000): print("AB04\nAB12")' >> large.txt])
 AT_CHECK([pspp -o pspp.csv examine.sps])
 dnl Ignore output -- this is just a no-crash check.
 AT_CLEANUP
@@ -726,6 +722,7 @@ begin data.
 300 threehundred
 end data.
 
+set small=0.
 examine x
        /statistics = extreme
        /id = y
@@ -852,17 +849,15 @@ x,F8.0
 g,F8.0
 
 Table: Case Processing Summary
-,,Cases,,,,,
+,g,Cases,,,,,
 ,,Valid,,Missing,,Total,
-,g,N,Percent,N,Percent,N,Percent
+,,N,Percent,N,Percent,N,Percent
 x,.,4,100.0%,0,.0%,4,100.0%
 ,1,9,100.0%,0,.0%,9,100.0%
 ,2,9,100.0%,0,.0%,9,100.0%
 ,9[a],4,100.0%,0,.0%,4,100.0%
 ,99[a],5,100.0%,0,.0%,5,100.0%
-
-Footnotes:
-a,User-missing value.
+Footnote: a. User-missing value.
 
 Table: Extreme Values
 ,g,,,Case Number,Value
@@ -916,9 +911,7 @@ x,.,Highest,1,31,4004
 ,,,3,25,701
 ,,,4,26,801
 ,,,5,27,901
-
-Footnotes:
-a,User-missing value.
+Footnote: a. User-missing value.
 ]])
 
 AT_CLEANUP
@@ -1311,15 +1304,15 @@ examine x  by g
 
 AT_CHECK([pspp -O format=csv shapiro-wilk.sps], [0],[dnl
 Table: Case Processing Summary
-,,Cases,,,,,
+,g,Cases,,,,,
 ,,Valid,,Missing,,Total,
-,g,N,Percent,N,Percent,N,Percent
+,,N,Percent,N,Percent,N,Percent
 x,1.00,10,100.0%,0,.0%,10,100.0%
 ,2.00,10,100.0%,0,.0%,10,100.0%
 
 Table: Tests of Normality
-,,Shapiro-Wilk,,
-,g,Statistic,df,Sig.
+,g,Shapiro-Wilk,,
+,,Statistic,df,Sig.
 x,1.00,.984,10,.983
 ,2.00,.882,10,.136
 ])