Add copyright and licence notices to files which lack them.
[pspp] / tests / language / expressions / parse.at
index df8192b28ed74d0d7978231b54052c34ddfe78b9..4a1dc855e3f70d7803eace8fc1e34de16d99bcc5 100644 (file)
@@ -1,4 +1,19 @@
-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
@@ -21,3 +36,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