From cd2adb6286a0edd817ac568f62da084738cbb43f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 27 Sep 2010 18:56:15 -0700 Subject: [PATCH] DO REPEAT: Add test for missing END REPEAT. Bug #31016. --- tests/language/control/do-repeat.at | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/language/control/do-repeat.at b/tests/language/control/do-repeat.at index 8f300dc9..a0b29d93 100644 --- a/tests/language/control/do-repeat.at +++ b/tests/language/control/do-repeat.at @@ -47,3 +47,21 @@ AT_CHECK([pspp -o pspp.csv do-repeat.sps]) AT_CHECK([cat pspp.csv], [0], [dnl ]) AT_CLEANUP + +dnl This program tests for a bug that crashed PSPP when END REPEAT +dnl was missing. See bug #31016. +AT_SETUP([DO REPEAT -- missing END REPEAT]) +AT_DATA([do-repeat.sps], [dnl +DATA LIST NOTABLE /x 1. +DO REPEAT y = 1 TO 10. +]) +AT_CHECK([pspp -o pspp.csv do-repeat.sps], [1], [dnl +error: DO REPEAT: DO REPEAT without END REPEAT. +error: Stopping syntax file processing here to avoid a cascade of dependent command failures. +]) +AT_CHECK([cat pspp.csv], [0], [dnl +error: DO REPEAT: DO REPEAT without END REPEAT. + +error: Stopping syntax file processing here to avoid a cascade of dependent command failures. +]) +AT_CLEANUP -- 2.30.2