From: Ben Pfaff Date: Tue, 28 Sep 2010 01:56:15 +0000 (-0700) Subject: DO REPEAT: Add test for missing END REPEAT. X-Git-Tag: v0.7.6~148 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd2adb6286a0edd817ac568f62da084738cbb43f;p=pspp-builds.git DO REPEAT: Add test for missing END REPEAT. Bug #31016. --- 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