X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fexpressions%2Fparse.at;h=cfa1db997e41e5f6dce03384db02a34991859683;hb=d9153beacc1308b37dbaf4f64155553360aa0173;hp=df8192b28ed74d0d7978231b54052c34ddfe78b9;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp diff --git a/tests/language/expressions/parse.at b/tests/language/expressions/parse.at index df8192b28e..cfa1db997e 100644 --- a/tests/language/expressions/parse.at +++ b/tests/language/expressions/parse.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([expression parsing]) AT_SETUP([parse expression with unknown variable crash]) @@ -21,3 +37,20 @@ parse.sps:10: error: IF: Unknown identifier y. parse.sps:11: error: Stopping syntax file processing here to avoid a cascade of dependent command failures. ]) AT_CLEANUP + +AT_SETUP([parse expression with invalid logical expression]) +AT_DATA([parse.sps], [dnl +INPUT PROGRAM. +LOOP c=1 to 10. +COMPUTE var1=NORMAL(100). +END CASE. +END LOOP. +END FILE. +END INPUT PROGRAM. + +SELECT IF 2. +]) +AT_CHECK([pspp -O format=csv parse.sps], [1], [dnl +"parse.sps:9: error: SELECT IF: A logical expression was found to have a value other than 0 (false), 1 (true), or the system-missing value. The result was forced to 0." +]) +AT_CLEANUP