From 8a0907d063f62c262485b26093ae56450197bb86 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 8 Aug 2010 16:32:08 -0700 Subject: [PATCH] SET: Add test to avoid regression on bug #30682. --- tests/automake.mk | 1 + tests/language/utilities/set.at | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tests/language/utilities/set.at diff --git a/tests/automake.mk b/tests/automake.mk index 6b523ce8b4..481ecce358 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -431,6 +431,7 @@ TESTSUITE_AT = \ tests/language/stats/flip.at \ tests/language/stats/frequencies.at \ tests/language/stats/oneway.at \ + tests/language/utilities/set.at \ tests/language/xforms/compute.at \ tests/language/xforms/recode.at \ tests/math/moments.at \ diff --git a/tests/language/utilities/set.at b/tests/language/utilities/set.at new file mode 100644 index 0000000000..851642ebdc --- /dev/null +++ b/tests/language/utilities/set.at @@ -0,0 +1,22 @@ +AT_BANNER([SET]) + +# This crashed older versions of PSPP (bug #30682). +AT_SETUP([SET FORMAT to invalid output format]) +AT_DATA([set.pspp], [dnl +DATA LIST LIST NOTABLE /x. +BEGIN DATA. +1 +2 +3 +END DATA. +SET FORMAT F41. +DESCRIPTIVES /x. +]) +AT_CHECK([pspp -O format=csv set.pspp], [1], [dnl +"set.pspp:7: error: SET: Output format F41.0 specifies width 41, but F requires a width between 1 and 40." + +Table: Valid cases = 3; cases with missing value(s) = 0. +Variable,N,Mean,Std Dev,Minimum,Maximum +x,3,2.00,1.00,1.00,3.00 +]) +AT_CLEANUP -- 2.30.2