-AT_BANNER([expression parsing])
+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 <http://www.gnu.org/licenses/>.
+dnl AT_BANNER([expression parsing])
AT_SETUP([parse expression with unknown variable crash])
AT_DATA([parse.sps], [dnl
AT_CHECK([pspp -O format=csv parse.sps], [1], [dnl
parse.sps:10: error: IF: Unknown identifier y.
-parse.sps:10: error: Stopping syntax file processing here to avoid a cascade of dependent command failures.
+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