Make the goto variable feature work again
[pspp] / tests / language / control / do-if.at
index 9f1457cce7646925c146915f7fdb088210921330..c4f9f0e483735951f844886df5a869889b5b5ca3 100644 (file)
@@ -54,7 +54,29 @@ AT_DATA([do-if.sps], [dnl
 DATA LIST LIST NOTABLE/a b c.
 END IF.
 ])
-AT_CHECK([pspp -O format=csv do-if.sps], [0], [dnl
-do-if.pspp:2: error: END IF: This command cannot appear outside DO IF...END IF.
+AT_CHECK([pspp -O format=csv do-if.sps], [1], [dnl
+do-if.sps:2: error: END IF: This command cannot appear outside DO IF...END IF.
 ])
 AT_CLEANUP
+
+
+
+AT_SETUP([ELSE without DO IF])
+AT_DATA([do-if.sps], [dnl
+DATA lIST NOTABLE LIST /QUA BRA *.
+BEGIN DATA
+4  1
+6  3
+END DATA
+
+ELSE QUA 'A string'.
+
+EXECUTE.
+])
+AT_CHECK([pspp -O format=csv do-if.sps], [1], [dnl
+do-if.sps:7: error: ELSE: This command cannot appear outside DO IF...END IF.
+
+do-if.sps:9: error: Stopping syntax file processing here to avoid a cascade of dependent command failures.
+])
+AT_CLEANUP
+