3 dnl Tests for a bug which caused the second procedure
4 dnl after GET to have corrupt input.
5 AT_SETUP([GET data works in multiple procedures])
6 AT_DATA([get.sps], [dnl
7 DATA LIST LIST NOTABLE /LOCATION * EDITOR * SHELL * FREQ * .
19 SAVE /OUTFILE='foo.sav'.
26 * But this one get rubbish
29 AT_CHECK([pspp -o pspp.csv get.sps])
30 AT_CHECK([cat pspp.csv], [0], [dnl
32 LOCATION,EDITOR,SHELL,FREQ
43 LOCATION,EDITOR,SHELL,FREQ
55 dnl Tests for a bug that crashed when GET specified a nonexistent file.
56 AT_SETUP([GET nonexistent file doesn't crash])
57 dnl We use stdin here, because the bug seems to manifest itself only in
59 AT_CHECK([echo "GET /FILE='nonexistent.sav'." | pspp -O format=csv], [1], [dnl
60 error: An error occurred while opening `nonexistent.sav': No such file or directory.
64 dnl Tests for bug #15766 (/KEEP subcommand on SAVE doesn't
65 dnl fully support ALL) and underlying problems.
66 m4_define([GET_KEEP_ALL],
67 [AT_SETUP([GET with /KEEP=ALL crashes -- $1])
68 AT_DATA([get.sps], [dnl
69 DATA LIST LIST NOTABLE
70 /a b c d e f g h i j k l m n o p q r s t u v w x y z (F2.0).
72 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
75 SAVE OUTFILE='test.sav'/$1.
76 GET FILE='test.sav'/KEEP=x y z all.
79 AT_CHECK([pspp -o pspp.csv get.sps])
80 AT_CHECK([cat pspp.csv], [0], [dnl
82 a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
83 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
86 x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w
87 24,25,26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
90 GET_KEEP_ALL([uncompressed])
91 GET_KEEP_ALL([compressed])