QUICK CLUSTER: Improve error messages and coding style.
[pspp] / tests / language / utilities / set.at
index ee66278dac8e4e16b801ff8d556b3d29cec6a828..c4165dc27d340bbff86718669c40091d313b059c 100644 (file)
@@ -29,7 +29,9 @@ 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."
+"set.pspp:7.12-7.14: error: SET: Output format F41.0 specifies width 41, but F requires a width between 1 and 40.
+    7 | SET FORMAT F41.
+      |            ^~~"
 
 Table: Descriptive Statistics
 ,N,Mean,Std Dev,Minimum,Maximum
@@ -46,7 +48,11 @@ AT_DATA([set.pspp], [dnl
 SET CCA='xxxx'.SHGW CCA.
 ])
 
-AT_CHECK([pspp -O format=csv set.pspp], [1], [ignore])
+AT_CHECK([pspp -O format=csv set.pspp], [1], [dnl
+"set.pspp:1.9-1.14: error: SET: Custom currency string `CCA' for xxxx does not contain exactly three periods or commas (or it contains both).
+    1 | SET CCA='xxxx'.SHGW CCA.
+      |         ^~~~~~"
+])
 AT_CLEANUP
 
 
@@ -121,8 +127,36 @@ x,y,z
 
 AT_CLEANUP
 
+AT_SETUP([SET macro - MEXPAND MPRINT MITERATE MNEST])
+AT_DATA([set-macro.sps], [dnl
+show mexpand mprint miterate mnest.
+preserve.
+set mexpand=off mprint=on miterate=10 mnest=11.
+show mexpand mprint miterate mnest.
+restore.
+show mexpand mprint miterate mnest.
+])
+AT_CHECK([pspp -O format=csv set-macro.sps], [0], [dnl
+Table: Settings
+MEXPAND,ON
+MPRINT,OFF
+MITERATE,1000
+MNEST,50
+
+Table: Settings
+MEXPAND,OFF
+MPRINT,ON
+MITERATE,10
+MNEST,11
+
+Table: Settings
+MEXPAND,ON
+MPRINT,OFF
+MITERATE,1000
+MNEST,50
+])
+AT_CLEANUP
 \f
-
 AT_BANNER([PRESERVE and RESTORE])
 
 AT_SETUP([PRESERVE of SET FORMAT])
@@ -135,10 +169,13 @@ RESTORE.
 SHOW FORMAT.
 ])
 AT_CHECK([pspp -O format=csv set.pspp], [0], [dnl
-set.pspp:1: note: SHOW: FORMAT is F8.2.
+Table: Settings
+FORMAT,F8.2
 
-set.pspp:5: note: SHOW: FORMAT is F10.0.
+Table: Settings
+FORMAT,F10.0
 
-set.pspp:6: note: SHOW: FORMAT is F8.2.
+Table: Settings
+FORMAT,F8.2
 ])
 AT_CLEANUP