Enable the show value labels feature
[pspp] / tests / ui / terminal / main.at
1 AT_BANNER([PSPP terminal UI])
2
3 AT_SETUP([nonexistent syntax file crash])
4 AT_CHECK([pspp nonexistent], [1], 
5   [error: Opening `nonexistent': No such file or directory.
6 ])
7 AT_CLEANUP
8
9 AT_SETUP([SIGTERM yields clean shutdown])
10 AT_DATA([main.sps], [dnl
11 INPUT PROGRAM.
12 COMPUTE x = x + 1.
13 DO IF x = 10000.
14 END CASE.
15 ELSE IF x < 0.
16 END FILE.
17 END IF.
18 END INPUT PROGRAM.
19 EXECUTE.
20 ])
21 AT_CHECK([pspp main.sps & sleep 1; kill $!; wait $!], [143], [], [ignore])
22 AT_CLEANUP
23
24 AT_SETUP([SIGSEGV yields error report])
25 AT_CHECK([[echo 'host command=["kill -SEGV $PPID"].' | pspp -O format=csv]],
26   [139], [], [stderr])
27
28 cat > expout <<EOF
29 ******************************************************
30 You have discovered a bug in PSPP.  Please report this
31 to $PACKAGE_BUGREPORT.  Please include this entire
32 message, *plus* several lines of output just above it.
33 For the best chance at having the bug fixed, also
34 include the syntax file that triggered it and a sample
35 of any data file used for input.
36 proximate cause:     Segmentation Violation
37 EOF
38
39 AT_CHECK([sed '/proximate/q' < stderr], [0], [expout])
40 AT_CLEANUP
41
42
43 dnl This tests for a crash which was observed with --syntax
44 AT_SETUP([argument parsing])
45
46 AT_DATA([main.sps], [dnl
47 ECHO 'This is a test'.
48 FINISH.
49 ])
50
51 AT_CHECK([pspp --syntax=enhanced main.sps], [0], [ignore])
52
53 AT_CLEANUP