Add some tests for empty parens
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 11 Jan 2016 08:43:09 +0000 (09:43 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 11 Jan 2016 12:03:36 +0000 (13:03 +0100)
tests/language/stats/examine.at
tests/language/stats/quick-cluster.at
tests/language/stats/regression.at

index 54307f4688732abb85c445ae6deb8498d6e254f1..29dab48ff2690f6095b0b9280fc14772d43c2a20 100644 (file)
@@ -1018,3 +1018,26 @@ X,Mean,,587.6603,23.2665
 ])
 
 AT_CLEANUP 
+
+
+
+dnl Test for a crash which happened on bad input syntax
+AT_SETUP([EXAMINE -- Empty Parentheses])
+
+AT_DATA([examine-empty-parens.sps], [dnl
+DATA LIST notable LIST /X *
+BEGIN DATA.
+2
+3
+END DATA.
+
+
+EXAMINE
+       x
+       /PLOT = SPREADLEVEL()
+       .
+])
+
+AT_CHECK([pspp -o pspp.csv examine-empty-parens.sps], [1], [ignore])
+
+AT_CLEANUP 
index e8135d7471269167bb33f67ba5ffba1e562db180..fd327f5c9a8bcddb097602082f775bf7c839c526 100644 (file)
@@ -414,3 +414,24 @@ Case Number,Cluster
 ])
 
 AT_CLEANUP
+
+
+dnl Test for a crash which happened on bad input syntax
+AT_SETUP([QUICK CLUSTER -- Empty Parentheses])
+
+AT_DATA([empty-parens.sps], [dnl
+data list notable list /x * y *.
+begin data.
+1   2
+1   2.2
+end data.
+
+QUICK CLUSTER x y
+       /CRITERIA = CONVERGE()
+       .
+])
+
+AT_CHECK([pspp -o pspp.csv empty-parens.sps], [1], [ignore])
+
+AT_CLEANUP
+
index 188d6a8de6c4b838f67cfbbbcdf142066989d111..d487ca8a8becbd7bac7af8e5de3c65798f64f72f 100644 (file)
@@ -2180,3 +2180,27 @@ V00291204               ,20.00,20.00,9.09
 V00300070               ,.00,90.00,4.55
 ])
 AT_CLEANUP
+
+
+dnl Test for a crash which happened on bad input syntax
+AT_SETUP([LINEAR REGRESSION -- Empty Parentheses])
+
+AT_DATA([empty-parens.sps], [dnl
+set format = F22.3.
+
+data list notable list /math female socst read science *
+begin data.
+    58.00      1.00     61.00     55.00     58.00
+    65.00      1.00     61.00     63.00     53.00
+end data.
+
+regression
+ /variables = math female socst read
+ /statistics = coeff r anova ci ()
+ /dependent = science
+ /method = enter
+])
+
+AT_CHECK([pspp -o pspp.csv empty-parens.sps], [1], [ignore])
+
+AT_CLEANUP