1 AT_BANNER([system files])
3 # Test that system files can be read properly, even when the case_size
4 # header value is -1 (Some 3rd party products do this).
5 AT_SETUP([system files with -1 case_size])
6 AT_DATA([save.sps], [dnl
7 DATA LIST LIST NOTABLE /cont (A32) size pop count.
9 cont 'continents of the world'
12 count 'number of countries'.
13 SAVE OUTFILE='cont.sav'.
15 Asia, 44579000, 3.7E+009, 44.00
16 Africa, 30065000, 7.8E+008, 53.00
17 "North America", 24256000, 4.8E+008, 23.00
18 "South America", 17819000, 3.4E+008, 12.00
19 Antarctica, 13209000, .00, .00
20 Europe, 9938000, 7.3E+008, 46.00
21 Australia/Oceania, 7687000, 31000000, 14.00
24 AT_CHECK([pspp -O format=csv save.sps])
25 AT_CHECK([test -f cont.sav])
27 dnl case_size is a 4-byte field at offset 68.
28 dnl Make a new copy with its value changed to -1.
30 [(dd if=cont.sav bs=1 count=68;
31 printf '\377\377\377\377';
32 dd if=cont.sav bs=1 skip=72) > cont2.sav], [0], [], [ignore])
33 AT_CHECK([cmp cont.sav cont2.sav], [1],
34 [cont.sav cont2.sav differ: char 69, line 1
37 AT_DATA([get.sps], [dnl
42 AT_CHECK([pspp -o pspp.csv get.sps])
43 AT_CHECK([cat pspp.csv], [0], [dnl
44 Variable,Label,,Position
45 cont,continents of the world,,1
48 count,number of countries,,4
52 Asia ,44579000,3.7E+009,44.00
53 Africa ,30065000,7.8E+008,53.00
54 North America ,24256000,4.8E+008,23.00
55 South America ,17819000,3.4E+008,12.00
56 Antarctica ,13209000,.00,.00
57 Europe ,9938000,7.3E+008,46.00
58 Australia/Oceania ,7687000,31000000,14.00