output: Add support for layer info in table output.
[pspp] / tests / language / stats / oneway.at
index c686f27c177ccd8c81a5bc5940bb37377ace9aec..58fd75e289ae712c1fc47e70b38ce88afc9a7256 100644 (file)
@@ -1,6 +1,23 @@
+dnl PSPP - a program for statistical analysis.
+dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl 
+dnl This program is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or
+dnl (at your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
+dnl
 AT_BANNER([ONEWAY procedure])
 
 AT_SETUP([ONEWAY basic operation])
+AT_KEYWORDS([categorical categoricals])
 AT_DATA([oneway.sps],
   [DATA LIST NOTABLE LIST /QUALITY * BRAND * .
 BEGIN DATA
@@ -70,6 +87,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY with splits])
+AT_KEYWORDS([categorical categoricals])
 AT_DATA([oneway-splits.sps],
 [DATA LIST NOTABLE LIST /QUALITY * BRAND * S *.
 BEGIN DATA
@@ -177,6 +195,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY with missing values])
+AT_KEYWORDS([categorical categoricals])
 dnl Check that missing are treated properly
 AT_DATA([oneway-missing1.sps],
 [DATA LIST NOTABLE LIST /v1 * v2 * dep * vn *.
@@ -282,6 +301,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY descriptives subcommand])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([oneway-descriptives.sps],
   [DATA LIST NOTABLE LIST /QUALITY * BRAND * .
@@ -331,6 +351,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY homogeneity subcommand])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([oneway-homogeneity.sps],
   [DATA LIST NOTABLE LIST /QUALITY * BRAND * .
@@ -376,6 +397,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY multiple variables])
+AT_KEYWORDS([categorical categoricals])
 dnl check that everything works ok when several different dependent variables are specified.
 dnl This of course does not mean that we're doing a multivariate analysis.  It's just like
 dnl running several tests at once.
@@ -484,6 +506,7 @@ AT_CLEANUP
 
 dnl Tests that everything treats weights properly
 AT_SETUP([ONEWAY vs. weights])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([oneway-unweighted.sps],
 [DATA LIST NOTABLE LIST /QUALITY * BRAND * W *.
@@ -555,6 +578,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY posthoc LSD and BONFERRONI])
+AT_KEYWORDS([categorical categoricals])
 AT_DATA([oneway-pig.sps],[dnl
 SET FORMAT F12.3.
 data list notable list /pigmentation * family *.
@@ -637,6 +661,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY posthoc Tukey HSD and Games-Howell])
+AT_KEYWORDS([categorical categoricals])
 AT_DATA([oneway-tukey.sps],[dnl
 set format = f11.3.
 data list notable list /libido * dose *.
@@ -693,6 +718,7 @@ Games-Howell,Placebo,1 Dose,-1.000,.887,.479,-3.356,1.356
 AT_CLEANUP
 
 AT_SETUP([ONEWAY posthoc Sidak])
+AT_KEYWORDS([categorical categoricals])
 AT_DATA([oneway-sidak.sps],[dnl
 SET FORMAT F20.4.
 
@@ -753,6 +779,7 @@ Table: Multiple Comparisons (score)
 AT_CLEANUP
 
 AT_SETUP([ONEWAY posthoc Scheffe])
+AT_KEYWORDS([categorical categoricals])
 AT_DATA([oneway-scheffe.sps],[dnl
 set format = f11.3.
 data list notable list /usage * group *.
@@ -835,6 +862,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY bad contrast count])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([oneway-bad-contrast.sps],[dnl
 DATA LIST NOTABLE LIST /height * weight * temperature * sex *.
@@ -906,6 +934,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY crash on single category independent variable])
+AT_KEYWORDS([categorical categoricals])
 AT_DATA([crash.sps],[
 input program.
 loop #i = 1 to 10.
@@ -927,6 +956,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY crash on missing dependent variable])
+AT_KEYWORDS([categorical categoricals])
 AT_DATA([crash2.sps],[dnl
 data list notable list /dv1 * dv2  *  y * .
 begin data.
@@ -955,6 +985,7 @@ AT_CLEANUP
 
 
 AT_SETUP([ONEWAY Games-Howell test with few cases])
+AT_KEYWORDS([categorical categoricals])
 AT_DATA([crash3.sps],[dnl
 data list notable list /dv * y * .
 begin data.
@@ -974,3 +1005,67 @@ ONEWAY
 AT_CHECK([pspp -O format=csv crash3.sps], [0], [ignore])
 
 AT_CLEANUP
+
+
+AT_SETUP([ONEWAY Crash on empty data])
+AT_KEYWORDS([categorical categoricals])
+AT_DATA([crash4.sps],[dnl
+DATA LIST NOTABLE LIST /height * weight * temperature * sex *.
+BEGIN DATA.
+1801     .       .     0
+1606     .       .     1
+END DATA.
+
+ONEWAY /VARIABLES= height weight temperature BY sex
+ /CONTRAST = -1  1
+ /CONTRAST = -3  3
+ /CONTRAST =  2 -2  1
+ /CONTRAST = -9  9
+ .
+])
+
+AT_CHECK([pspp -O format=csv crash4.sps], [0], [ignore])
+
+AT_CLEANUP
+
+
+
+AT_SETUP([ONEWAY Crash on invalid dependent variable])
+AT_KEYWORDS([categorical categoricals])
+AT_DATA([crash5.sps],[dnl
+data list notable list /a * b *.
+begin data.
+3 0
+2 0
+6 2
+end data.
+
+oneway a"by b.
+
+])
+
+AT_CHECK([pspp -O format=csv crash5.sps], [1], [ignore])
+
+AT_CLEANUP
+
+
+
+
+AT_SETUP([ONEWAY Crash on unterminated string])
+AT_KEYWORDS([categorical categoricals])
+
+AT_DATA([crash6.sps], [dnl
+DATA LIST NOTABLE LIST /height * weight * temperature * sex *.
+BEGIN DATA.
+1801     .       .     0
+1606     .   0   .     1
+END DATA.
+
+ONEWAY /VARIABLES= height weight temperature BY sex
+ /CONTRAST =" 2 -2  1
+ .
+])
+
+AT_CHECK([pspp -O format=csv crash6.sps], [1], [ignore])
+
+AT_CLEANUP