X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fcontrol%2Fdo-if.at;h=01dae0d904f03fbc6eb676a373f76acb4cf8fe72;hb=e48391e8dee233d2bf5e30c5e9577757cb76af6d;hp=2136c9b5668f0c48afd329d09505a267f4c9b0e9;hpb=441a0be4dad876e64150d0e4694263caffc37002;p=pspp diff --git a/tests/language/control/do-if.at b/tests/language/control/do-if.at index 2136c9b566..01dae0d904 100644 --- a/tests/language/control/do-if.at +++ b/tests/language/control/do-if.at @@ -1,3 +1,19 @@ +dnl PSPP - a program for statistical analysis. +dnl Copyright (C) 2017 Free Software Foundation, Inc. +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program. If not, see . +dnl AT_BANNER([DO IF]) AT_SETUP([DO IF]) @@ -58,3 +74,25 @@ 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 +