1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
17 AT_BANNER([PSPP terminal UI])
19 AT_SETUP([nonexistent syntax file crash])
20 AT_CHECK([pspp nonexistent], [1],
21 [error: Opening `nonexistent': No such file or directory.
25 AT_SETUP([SIGTERM yields clean shutdown])
27 AT_DATA([main.sps], [dnl
38 AT_CHECK([pspp main.sps & sleep 1; kill $!; wait $!], [143], [], [ignore])
41 AT_SETUP([SIGSEGV yields error report])
43 # This test intentionally causes SIGSEGV, so make Address Sanitizer ignore it.
44 ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS
46 AT_CHECK([[echo 'host command=["kill -SEGV $PPID"].' | pspp -O format=csv]],
50 ******************************************************
51 You have discovered a bug in PSPP. Please report this
52 to $PACKAGE_BUGREPORT. Please include this entire
53 message, *plus* several lines of output just above it.
54 For the best chance at having the bug fixed, also
55 include the syntax file that triggered it and a sample
56 of any data file used for input.
57 proximate cause: Segmentation Violation
60 AT_CHECK([sed '/proximate/q' < stderr], [0], [expout])
64 dnl This tests for a crash which was observed with --syntax
65 AT_SETUP([argument parsing])
67 AT_DATA([main.sps], [dnl
68 ECHO 'This is a test'.
72 AT_CHECK([pspp --syntax=enhanced main.sps], [0], [ignore])