1 AT_BANNER([system file reader - positive])
3 AT_SETUP([variable labels and missing values])
4 AT_KEYWORDS([sack synthetic system file positive])
5 AT_DATA([sys-file.sack], [dnl
7 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
9 28; dnl Nominal case size
14 "01 Jan 11"; "20:53:52";
15 "PSPP synthetic test file: "; i8 244; i8 245; i8 246; i8 248; s34 "";
18 dnl Numeric variable, no label or missing values.
19 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
21 dnl Numeric variable, variable label.
22 2; 0; 1; 0; 0x050800 *2; s8 "NUM2";
23 32; "Numeric variable 2's label ("; i8 249; i8 250; i8 251; ")";
25 dnl Numeric variable, one missing value.
26 2; 0; 0; 1; 0x050800 *2; s8 "NUM3";
29 dnl Numeric variable, variable label and missing value.
30 2; 0; 1; 1; 0x050800 *2; s8 "NUM4";
31 30; "Another numeric variable label"; i8 0 * 2;
34 dnl Numeric variable, two missing values.
35 2; 0; 0; 2; 0x050800 *2; s8 "NUM5"; 1.0; 2.0;
37 dnl Numeric variable, three missing values.
38 2; 0; 0; 3; 0x050800 *2; s8 "NUM6"; 1.0; 2.0; 3.0;
40 dnl Numeric variable, range of missing values.
41 2; 0; 0; -2; 0x050800 *2; s8 "NUM7"; 1.0; 3.0;
43 dnl Numeric variables, range of missing values plus discrete value.
44 2; 0; 0; -3; 0x050800 *2; s8 "NUM8"; 1.0; 3.0; 5.0;
45 2; 0; 0; -3; 0x050800 *2; s8 "NUM9"; 1.0; HIGHEST; -5.0;
46 2; 0; 0; -3; 0x050800 *2; "NUM"; i8 192; i8 200; i8 204; i8 209; i8 210;
49 dnl String variable, no label or missing values.
50 2; 4; 0; 0; 0x010400 *2; s8 "STR1";
52 dnl String variable, variable label.
53 2; 4; 1; 0; 0x010400 *2; s8 "STR2";
54 25; "String variable 2's label"; i8 0 * 3;
56 dnl String variable, one missing value.
57 2; 4; 0; 1; 0x010400 *2; s8 "STR3"; s8 "MISS";
59 dnl String variable, variable label and missing value.
60 2; 4; 1; 1; 0x010400 *2; s8 "STR4";
61 29; "Another string variable label"; i8 0 * 3;
64 dnl String variable, two missing values.
65 2; 4; 0; 2; 0x010400 *2; s8 "STR5"; s8 "MISS"; s8 "OTHR";
67 dnl String variable, three missing values.
68 2; 4; 0; 3; 0x010400 *2; s8 "STR6"; s8 "MISS"; s8 "OTHR"; s8 "MORE";
70 dnl Long string variable, one missing value.
71 dnl (This is not how SPSS represents missing values for long strings--it
72 dnl uses a separate record as shown later below--but old versions of PSPP
73 dnl did use this representation so we continue supporting it for backward
75 2; 11; 0; 1; 0x010b00 *2; s8 "STR7"; "first8by";
76 2; -1; 0; 0; 0; 0; s8 "";
78 dnl Long string variables that will have missing values added with a
80 2; 9; 0; 0; 0x010900 *2; s8 "STR8";
81 2; -1; 0; 0; 0; 0; s8 "";
82 2; 10; 0; 0; 0x010a00 *2; s8 "STR9";
83 2; -1; 0; 0; 0; 0; s8 "";
84 2; 11; 0; 0; 0x010b00 *2; s8 "STR10";
85 2; -1; 0; 0; 0; 0; s8 "";
87 dnl Long string variable, value label.
88 2; 25; 1; 0; 0x011900 *2; s8 "STR11"; 14; "25-byte string"; i8 0 * 2;
89 ( 2; -1; 0; 0; 0; 0; s8 ""; ) * 2;
90 dnl Variable label fields on continuation records have been spotted in system
91 dnl files created by "SPSS Power Macintosh Release 6.1".
92 2; -1; 1; 0; 0; 0; s8 ""; 20; "dummy variable label";
94 dnl Machine integer info record.
95 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
97 dnl Machine floating-point info record.
98 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST;
100 dnl Long string variable missing values record.
102 dnl One missing value for STR8.
103 COUNT("STR8"); i8 1; 8; "abcdefgh";
105 dnl Two missing values for STR9.
106 COUNT("STR9"); i8 2; 8; "abcdefgh"; 8; "01234567";
108 dnl Three missing values for STR9.
109 COUNT("STR10"); i8 3; 8; "abcdefgh"; 8; "01234567"; 8; "0 ";
112 dnl Character encoding record.
113 7; 20; 1; 12; "windows-1252";
115 dnl Dictionary termination record.
119 1.0; 2.0; 3.0; 4.0; 5.0; 6.0; 7.0; 8.0; 9.0; 10.0;
120 s8 "abcd"; s8 "efgh"; s8 "ijkl"; s8 "mnop"; s8 "qrst"; s8 "uvwx";
121 s16 "yzABCDEFGHI"; s16 "JKLMNOPQR"; s16 "STUVWXYZ01";
122 s16 "23456789abc"; s32 "defghijklmnopqstuvwxyzABC";
125 "be ae072375af73d628a544cc2230dd72c9" \
126 "le 039a21ab64f68c65b240e782a6b0f563"
129 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
131 AT_DATA([sys-file.sps], [dnl
132 GET FILE='sys-file.sav'.
137 AT_CHECK([pspp -o pspp.csv sys-file.sps])
138 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
139 File label: PSPP synthetic test file: ôõöø
141 Variable,Description,,Position
143 num2,Label: Numeric variable 2's label (ùúû),,2
147 num4,Label: Another numeric variable label,,4
151 ,Missing Values: 1; 2,,
153 ,Missing Values: 1; 2; 3,,
155 ,Missing Values: 1 THRU 3,,
157 ,Missing Values: 1 THRU 3; 5,,
159 ,Missing Values: 1 THRU HIGHEST; -5,,
160 numàèìñò,Format: F8.0,,10
161 ,Missing Values: LOWEST THRU 1; 5,,
163 str2,Label: String variable 2's label,,12
166 ,"Missing Values: ""MISS""",,
167 str4,Label: Another string variable label,,14
169 ,"Missing Values: ""OTHR""",,
171 ,"Missing Values: ""MISS""; ""OTHR""",,
173 ,"Missing Values: ""MISS""; ""OTHR""; ""MORE""",,
175 ,"Missing Values: ""first8by""",,
177 ,"Missing Values: ""abcdefgh""",,
179 ,"Missing Values: ""abcdefgh""; ""01234567""",,
180 str10,Format: A11,,20
181 ,"Missing Values: ""abcdefgh""; ""01234567""; ""0 """,,
182 str11,Label: 25-byte string,,21
186 num1,num2,num3,num4,num5,num6,num7,num8,num9,numàèìñò,str1,str2,str3,str4,str5,str6,str7,str8,str9,str10,str11
187 1,2,3,4,5,6,7,8,9,10,abcd,efgh,ijkl,mnop,qrst,uvwx,yzABCDEFGHI,JKLMNOPQR,STUVWXYZ01,23456789abc,defghijklmnopqstuvwxyzABC
192 AT_SETUP([unspecified number of variable positions])
193 AT_KEYWORDS([sack synthetic system file positive])
194 AT_DATA([sys-file.sack], [dnl
196 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
198 -1; dnl Nominal case size (unspecified)
199 0; dnl Not compressed
203 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
206 dnl Numeric variable, no label or missing values.
207 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
209 dnl Numeric variable, variable label.
210 2; 0; 1; 0; 0x050800 *2; s8 "NUM2";
211 26; "Numeric variable 2's label"; i8 0 *2;
213 dnl Dictionary termination record.
220 "be 413e7bc80a47fcd7e4c8020e8e120060" \
221 "le d7db9120b1ff28c83aa6fe9fc405d903"
224 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
226 AT_DATA([sys-file.sps], [dnl
227 GET FILE='sys-file.sav'.
231 AT_CHECK([pspp -o pspp.csv sys-file.sps])
232 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
233 Variable,Description,,Position
235 num2,Label: Numeric variable 2's label,,2
245 AT_SETUP([wrong number of variable positions but version 13])
246 AT_KEYWORDS([sack synthetic system file positive])
247 AT_DATA([sys-file.sack], [dnl
249 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
251 -1; dnl Nominal case size (unspecified)
252 0; dnl Not compressed
256 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
259 dnl Numeric variable, no label or missing values.
260 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
262 dnl Numeric variable, variable label.
263 2; 0; 1; 0; 0x050800 *2; s8 "NUM2";
264 26; "Numeric variable 2's label"; i8 0 *2;
266 dnl Machine integer info record (SPSS 13).
267 7; 3; 4; 8; 13; 2; 3; -1; 1; 1; ENDIAN; 1252;
269 dnl Dictionary termination record.
276 "be 3d17aae7d99538dc73c5cb42692b1038" \
277 "le 8ad1000df598617d5258f323c882d749"
280 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
282 AT_DATA([sys-file.sps], [dnl
283 GET FILE='sys-file.sav'.
287 AT_CHECK([pspp -o pspp.csv sys-file.sps])
288 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
289 Variable,Description,,Position
291 num2,Label: Numeric variable 2's label,,2
301 AT_SETUP([value labels])
302 AT_KEYWORDS([sack synthetic system file positive])
303 AT_DATA([sys-file.sack], [dnl
305 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
307 22; dnl Nominal case size
308 0; dnl Not compressed
312 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
315 dnl Numeric variables.
316 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
317 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
318 2; 0; 0; 0; 0x050800 *2; s8 "NUM3";
319 2; 0; 0; 0; 0x050800 *2; s8 "NUM4";
320 2; 0; 0; 0; 0x050800 *2; s8 "NUM5";
322 dnl String variables.
323 2; 1; 0; 0; 0x010100 *2; s8 "STR1"; dnl index 6
324 2; 2; 0; 0; 0x010200 *2; s8 "STR2"; dnl index 7
325 2; 3; 0; 0; 0x010300 *2; s8 "STR3"; dnl index 8
326 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; dnl index 9
327 2; 4; 0; 0; 0x010400 *2; s8 "STR5"; dnl index 10
328 2; 6; 0; 0; 0x010600 *2; s8 "STR6"; dnl index 11
329 2; 7; 0; 0; 0x010700 *2; s8 "STR7"; dnl index 12
330 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; dnl index 13
331 2; 9; 0; 0; 0x010900 *2; "STR9"; i8 230; s3 ""; dnl index 14
332 2; -1; 0; 0; 0; 0; s8 "";
333 2; 12; 0; 0; 0x010c00 *2; s8 "STR12"; dnl index 16
334 2; -1; 0; 0; 0; 0; s8 "";
335 2; 16; 0; 0; 0x011000 *2; s8 "STR16"; dnl index 18
336 2; -1; 0; 0; 0; 0; s8 "";
337 2; 17; 0; 0; 0x011100 *2; s8 "STR17"; dnl index 20
338 ( 2; -1; 0; 0; 0; 0; s8 ""; ) * 2;
340 dnl One value label for NUM1.
341 3; 1; 1.0; i8 17; i8 238; i8 228; i8 232; i8 237; s19 " (in Russian)"; 4; 1; 1;
343 dnl Two value labels for NUM2, as a single pair of type 3 and type 4 records.
344 3; 2; 1.0; i8 3; s7 "one"; 2.0; i8 3; s7 "two"; 4; 1; 2;
346 dnl Two value labels for NUM3, as two pairs of type 3 and type 4 records.
347 3; 1; 3.0; i8 5; s7 "three"; 4; 1; 3;
348 3; 1; 4.0; i8 4; s7 "four"; 4; 1; 3;
350 dnl Two common value labels for NUM4 and NUM5, plus two different ones for each.
351 3; 1; 5.0; i8 4; s7 "five"; 4; 1; 4;
352 3; 1; 6.0; i8 3; s7 "six"; 4; 1; 5;
353 3; 2; 7.0; i8 5; s7 "seven"; 8.0; i8 5; s7 "eight"; 4; 2; 4; 5;
354 3; 1; 9.0; i8 4; s7 "nine"; 4; 1; 4;
355 3; 1; 10.0; i8 3; s7 "ten"; 4; 1; 5;
357 dnl One value label for STR1.
358 3; 1; s8 "a"; i8 19; s23 "value label for `a'"; 4; 1; 6;
360 dnl Two value labels for STR2, as a single pair of type 3 and type 4 records.
362 s8 "bc"; i8 20; s23 "value label for `bc'";
363 s8 "de"; i8 20; s23 "value label for `de'";
366 dnl Two value labels for STR3, as two pairs of type 3 and type 4 records.
367 3; 1; s8 "fgh"; i8 21; s23 "value label for `fgh'"; 4; 1; 8;
368 3; 1; s8 "ijk"; i8 21; s23 "value label for `ijk'"; 4; 1; 8;
370 dnl Two common value labels for STR4 and STR5, plus two different ones for each.
371 3; 1; s8 "lmno"; i8 22; s23 "value label for `lmno'"; 4; 1; 9;
372 3; 1; s8 "pqrs"; i8 22; s23 "value label for `pqrs'"; 4; 1; 10;
374 s8 "tuvw"; i8 22; s23 "value label for `tuvw'";
375 s8 "xyzA"; i8 22; s23 "value label for `xyzA'";
377 3; 1; s8 "BCDE"; i8 22; s23 "value label for `BCDE'"; 4; 1; 9;
378 3; 1; s8 "FGHI"; i8 22; s23 "value label for `FGHI'"; 4; 1; 10;
380 dnl One value label for STR6, STR7, STR8.
381 3; 1; s8 "JKLMNO"; i8 24; s31 "value label for `JKLMNO'"; 4; 1; 11;
382 3; 1; s8 "JKLMNOP"; i8 25; s31 "value label for `JKLMNOP'"; 4; 1; 12;
383 3; 1; s8 "JKLMNOPQ"; i8 26; s31 "value label for `JKLMNOPQ'"; 4; 1; 13;
385 dnl Machine integer info record.
386 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1251;
388 dnl Character encoding record.
389 7; 20; 1; 12; "windows-1251";
392 dnl One value label for STR9ж,
393 COUNT("STR9"; i8 230); 9; 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'");
395 dnl Two value labels for STR12.
396 COUNT("STR12"); 12; 2;
397 COUNT("0123456789ab"); COUNT("value label for `0123456789ab'");
398 COUNT("cdefghijklmn"); COUNT("value label for `cdefghijklmn'");
400 dnl Three value labels for STR16.
401 COUNT("STR16"); 16; 3;
402 COUNT("opqrstuvwxyzABCD"); COUNT("value label for `opqrstuvwxyzABCD'");
403 COUNT("EFGHIJKLMNOPQRST"); COUNT("value label for `EFGHIJKLMNOPQRST'");
404 COUNT("UVWXYZ0123456789"); COUNT("value label for `UVWXYZ0123456789' with Cyrillic letters: `"; i8 244; i8 245; i8 246; "'");
406 dnl One value label for STR17.
407 COUNT("STR17"); 17; 1;
408 COUNT("abcdefghijklmnopq"); COUNT("value label for `abcdefghijklmnopq'");
411 dnl Dictionary termination record.
415 "be b27d766d8a5ad9e901c8b244591a5942" \
416 "le eb2e93f3cc29acd605b80e6c3af25ba6"
419 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
421 AT_DATA([sys-file.sps], [dnl
422 GET FILE='sys-file.sav'.
425 AT_CHECK([pspp -o pspp.csv sys-file.sps])
426 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
427 Variable,Description,,Position
429 ,1,один (in Russian),
447 ,a,value label for `a',
449 ,bc,value label for `bc',
450 ,de,value label for `de',
452 ,fgh,value label for `fgh',
453 ,ijk,value label for `ijk',
455 ,BCDE,value label for `BCDE',
456 ,lmno,value label for `lmno',
457 ,tuvw,value label for `tuvw',
458 ,xyzA,value label for `xyzA',
460 ,FGHI,value label for `FGHI',
461 ,pqrs,value label for `pqrs',
462 ,tuvw,value label for `tuvw',
463 ,xyzA,value label for `xyzA',
465 ,JKLMNO,value label for `JKLMNO',
467 ,JKLMNOP,value label for `JKLMNOP',
469 ,JKLMNOPQ,value label for `JKLMNOPQ',
471 ,RSTUVWXYZ,value label for `RSTUVWXYZ',
472 str12,Format: A12,,15
473 ,0123456789ab,value label for `0123456789ab',
474 ,cdefghijklmn,value label for `cdefghijklmn',
475 str16,Format: A16,,16
476 ,EFGHIJKLMNOPQRST,value label for `EFGHIJKLMNOPQRST',
477 ,UVWXYZ0123456789,value label for `UVWXYZ0123456789' with Cyrillic letters: `фхц',
478 ,opqrstuvwxyzABCD,value label for `opqrstuvwxyzABCD',
479 str17,Format: A17,,17
480 ,abcdefghijklmnopq,value label for `abcdefghijklmnopq',
485 AT_SETUP([documents])
486 AT_KEYWORDS([sack synthetic system file positive])
487 AT_DATA([sys-file.sack], [dnl
489 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
491 1; dnl Nominal case size
492 0; dnl Not compressed
496 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
499 dnl Numeric variable, no label or missing values.
500 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
502 dnl Machine integer info record.
503 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
507 s80 "First line of documents";
508 s80 "Second line of documents";
509 "abb"; i8 233; " appliqu"; i8 233; " attach"; i8 233; " blas"; i8 233; " caf"; i8 233; " canap"; i8 233; " clich"; i8 233; " consomm"; i8 233;
512 s80 "Last line of documents";
514 dnl Character encoding record.
515 7; 20; 1; 12; "windows-1252";
517 dnl Dictionary termination record.
524 "be 3555f74f3e714a3a703de7df56ce6d24" \
525 "le ede5a0f805a1aab096ea86abf677ff34"
528 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
530 AT_DATA([sys-file.sps], [dnl
531 GET FILE='sys-file.sav'.
535 AT_CHECK([pspp -o pspp.csv sys-file.sps])
536 AT_CHECK([cat pspp.csv], [0], [dnl
537 Documents in the active dataset:
539 First line of documents
541 Second line of documents
543 abbé appliqué attaché blasé café canapé cliché consommé
547 Last line of documents
556 AT_SETUP([multiple response sets])
557 AT_KEYWORDS([sack synthetic system file positive])
558 AT_DATA([sys-file.sack], [dnl
560 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
562 16; dnl Nominal case size
563 0; dnl Not compressed
567 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
571 2; 0; 0; 0; 0x050800 *2; i8 0x82; i8 0xa0; s6 "";
572 2; 0; 0; 0; 0x050800 *2; s8 "B";
573 2; 0; 0; 0; 0x050800 *2; s8 "C";
576 2; 0; 0; 0; 0x050800 *2; s8 "D";
577 2; 0; 0; 0; 0x050800 *2; s8 "E";
578 2; 0; 0; 0; 0x050800 *2; s8 "F";
579 2; 0; 0; 0; 0x050800 *2; s8 "G";
582 2; 4; 0; 0; 0x010400 *2; s8 "H";
583 2; 4; 0; 0; 0x010400 *2; s8 "I";
584 2; 4; 0; 0; 0x010400 *2; s8 "J";
587 2; 0; 0; 0; 0x050800 *2; s8 "K";
588 2; 0; 0; 0; 0x050800 *2; s8 "L";
589 2; 0; 0; 0; 0x050800 *2; s8 "M";
592 2; 6; 0; 0; 0x010600 *2; s8 "N";
593 2; 6; 0; 0; 0x010600 *2; s8 "O";
594 2; 6; 0; 0; 0x010600 *2; s8 "P";
596 dnl Machine integer info record.
597 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 932;
601 "$a=C 10 my mcgroup "; i8 0x82; i8 0xa0; " b c"; i8 10;
602 "$b=D2 55 0 g e f d"; i8 10; i8 10;
603 "$c=D4 "; i8 0x82; i8 0xcd; i8 0x82; i8 0xa2; " 10 mdgroup #2 h i j"; i8 10);
608 "$d=E 1 2 34 13 third mdgroup k l m"; i8 10;
609 "$e=E 11 6 choice 0 n o p"; i8 10; i8 10; i8 10; i8 10);
611 dnl Character encoding record.
612 7; 20; 1; 9; "shift_jis";
614 dnl Dictionary termination record.
618 "be eab38c68398324ac1663161512a8516a" \
619 "le afc6173eed7f4c4e63dc4252bc18f6a2"
622 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
624 AT_DATA([sys-file.sps], [dnl
625 GET FILE='sys-file.sav'.
626 MRSETS /DISPLAY NAME=ALL.
628 AT_CHECK([pspp -o pspp.csv sys-file.sps])
629 AT_CHECK([cat pspp.csv], [0], [dnl
630 Table: Multiple Response Sets
631 Name,Variables,Details
635 ","Multiple category set
642 ","Multiple dichotomy set
644 Category label source: Variable labels
649 ","Multiple dichotomy set
651 Label source: Provided by user
653 Category label source: Variable labels
658 ","Multiple dichotomy set
660 Label source: Provided by user
662 Category label source: Value labels of counted value
667 ","Multiple dichotomy set
668 Label source: First variable label among variables
669 Counted value: `choice'
670 Category label source: Value labels of counted value
676 dnl Also checks for handling of CR-only line ends in file label and
677 dnl extra product info.
678 AT_SETUP([extra product info])
679 AT_KEYWORDS([sack synthetic system file positive])
680 AT_DATA([sys-file.sack], [dnl
682 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
684 4; dnl Nominal case size
685 0; dnl Not compressed
689 "01 Jan 11"; "20:53:52"; "PSPP synthetic"; i8 13; s49 "test file";
692 dnl Numeric variables.
693 2; 0; 0; 0; 0x050800 *2; s8 "A";
694 2; 0; 0; 0; 0x050800 *2; s8 "B";
695 2; 0; 0; 0; 0x050800 *2; s8 "C";
696 2; 0; 0; 0; 0x050800 *2; s8 "D";
698 dnl Extra product info.
699 7; 10; 1; COUNT ("Extra product info"; i8 13; "another line"; i8 13; "blah");
701 dnl Dictionary termination record.
705 "be 0e1cac77501322b012637dcaeb3858ab" \
706 "le ecffd25cae41bbc89c29487abe192016"
709 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
711 AT_DATA([sys-file.sps], [dnl
712 SYSFILE INFO FILE='sys-file.sav'.
714 AT_CHECK([pspp -o pspp.csv sys-file.sps])
715 AT_CHECK([sed 7q pspp.csv], [0], [dnl
717 Label:,"PSPP synthetic
719 Created:,01 Jan 11 20:53:52 by $(@%:@) SPSS DATA FILE PSPP synthetic test file
720 Product:,"Extra product info
727 AT_SETUP([variable display parameters, without width])
728 AT_KEYWORDS([sack synthetic system file positive])
729 AT_DATA([sys-file.sack], [dnl
731 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
733 19; dnl Nominal case size
734 0; dnl Not compressed
738 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
741 dnl Numeric variables.
742 2; 0; 0; 0; 0x050800 *2; s8 "A";
743 2; 0; 0; 0; 0x050800 *2; s8 "B";
744 2; 0; 0; 0; 0x050800 *2; s8 "C";
745 2; 0; 0; 0; 0x050800 *2; s8 "D";
747 dnl Short string variables.
748 2; 3; 0; 0; 0x010300 *2; s8 "H";
749 2; 3; 0; 0; 0x010300 *2; s8 "I";
750 2; 3; 0; 0; 0x010300 *2; s8 "J";
751 2; 3; 0; 0; 0x010300 *2; s8 "K";
753 dnl Long string variables.
754 2; 9; 0; 0; 0x010900 *2; s8 "L";
755 2; -1; 0; 0; 0; 0; s8 "";
756 2; 10; 0; 0; 0x010a00 *2; s8 "M";
757 2; -1; 0; 0; 0; 0; s8 "";
758 2; 17; 0; 0; 0x011100 *2; s8 "N";
759 ( 2; -1; 0; 0; 0; 0; s8 "" ) * 2;
760 2; 25; 0; 0; 0x011900 *2; s8 "O";
761 ( 2; -1; 0; 0; 0; 0; s8 "" ) * 3;
763 dnl Variable display parameters
778 dnl Dictionary termination record.
782 "be c130d9345080579b8862b360924edbfa" \
783 "le 6fde96f5a7c7386bff6cca049cd84d6a"
786 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
788 AT_DATA([sys-file.sps], [dnl
789 GET FILE='sys-file.sav'.
792 AT_CHECK([pspp -o pspp.csv sys-file.sps])
793 AT_CHECK([cat pspp.csv], [0], [dnl
794 Variable,Description,,Position
797 ,Display Alignment: Left,,
801 ,Display Alignment: Left,,
805 ,Display Alignment: Left,,
809 ,Display Alignment: Right,,
813 ,Display Alignment: Right,,
817 ,Display Alignment: Right,,
821 ,Display Alignment: Center,,
825 ,Display Alignment: Center,,
829 ,Display Alignment: Center,,
833 ,Display Alignment: Left,,
837 ,Display Alignment: Right,,
841 ,Display Alignment: Center,,
847 AT_SETUP([variable display parameters, with width])
848 AT_KEYWORDS([sack synthetic system file positive])
849 AT_DATA([sys-file.sack], [dnl
851 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
853 19; dnl Nominal case size
854 0; dnl Not compressed
858 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
861 dnl Numeric variables.
862 2; 0; 0; 0; 0x050800 *2; s8 "A";
863 2; 0; 0; 0; 0x050800 *2; s8 "B";
864 2; 0; 0; 0; 0x050800 *2; s8 "C";
865 2; 0; 0; 0; 0x050800 *2; s8 "D";
867 dnl Short string variables.
868 2; 3; 0; 0; 0x010300 *2; s8 "H";
869 2; 3; 0; 0; 0x010300 *2; s8 "I";
870 2; 3; 0; 0; 0x010300 *2; s8 "J";
871 2; 3; 0; 0; 0x010300 *2; s8 "K";
873 dnl Long string variables.
874 2; 9; 0; 0; 0x010900 *2; s8 "L";
875 2; -1; 0; 0; 0; 0; s8 "";
876 2; 10; 0; 0; 0x010a00 *2; s8 "M";
877 2; -1; 0; 0; 0; 0; s8 "";
878 2; 17; 0; 0; 0x011100 *2; s8 "N";
879 ( 2; -1; 0; 0; 0; 0; s8 "" ) * 2;
880 2; 25; 0; 0; 0x011900 *2; s8 "O";
881 ( 2; -1; 0; 0; 0; 0; s8 "" ) * 3;
883 dnl Variable display parameters
898 dnl Dictionary termination record.
902 "be 3ace75689a0b7faa9360936bbfe26055" \
903 "le 6e93f35d19a9882eb53ffb1b067ef7cd"
906 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
908 AT_DATA([sys-file.sps], [dnl
909 GET FILE='sys-file.sav'.
912 AT_CHECK([pspp -o pspp.csv sys-file.sps])
913 AT_CHECK([cat pspp.csv], [0], [dnl
914 Variable,Description,,Position
917 ,Display Alignment: Left,,
921 ,Display Alignment: Left,,
925 ,Display Alignment: Left,,
929 ,Display Alignment: Right,,
933 ,Display Alignment: Right,,
937 ,Display Alignment: Right,,
941 ,Display Alignment: Center,,
945 ,Display Alignment: Center,,
949 ,Display Alignment: Center,,
953 ,Display Alignment: Left,,
957 ,Display Alignment: Right,,
961 ,Display Alignment: Center,,
967 AT_SETUP([long variable names])
968 AT_KEYWORDS([sack synthetic system file positive])
969 AT_DATA([sys-file.sack], [dnl
971 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
973 7; dnl Nominal case size
974 0; dnl Not compressed
978 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
981 dnl Numeric variables.
982 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI";
983 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_A";
984 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_B";
985 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_C";
986 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDINA";
987 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDI_A";
988 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDI_B";
990 dnl Machine integer info record.
991 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
993 dnl Machine floating-point info record.
994 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST;
996 dnl Long variable names.
998 "LONGVARI=LongVariableName1"; i8 9;
999 "LONGVA_A=LongVariableName2"; i8 9;
1000 "LONGVA_B=LongVariableName3"; i8 9;
1001 "LONGVA_C=LongVariableName4"; i8 9;
1002 "CO"; i8 214; "RDINA=Co"; i8 246; "rdinate_X"; i8 9;
1003 "CO"; i8 214; "RDI_A=Co"; i8 246; "rdinate_Y"; i8 9;
1004 "CO"; i8 214; "RDI_B=Co"; i8 246; "rdinate_Z";
1007 dnl Character encoding record.
1008 7; 20; 1; 12; "windows-1252";
1010 dnl Dictionary termination record.
1014 "be 8ea5a72f3ae6e732371e92a7719c3951" \
1015 "le 02bcf02cf08b1e8fc80a858101ae22fc"
1018 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1020 AT_DATA([sys-file.sps], [dnl
1021 GET FILE='sys-file.sav'.
1024 AT_CHECK([pspp -o pspp.csv sys-file.sps])
1025 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1026 Variable,Description,,Position
1027 LongVariableName1,Format: F8.0,,1
1028 LongVariableName2,Format: F8.0,,2
1029 LongVariableName3,Format: F8.0,,3
1030 LongVariableName4,Format: F8.0,,4
1031 Coördinate_X,Format: F8.0,,5
1032 Coördinate_Y,Format: F8.0,,6
1033 Coördinate_Z,Format: F8.0,,7
1038 AT_SETUP([very long strings])
1039 AT_KEYWORDS([sack synthetic system file positive])
1040 AT_DATA([sys-file.sack], [dnl
1042 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1044 109; dnl Nominal case size
1045 0; dnl Not compressed
1049 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1052 dnl 256-byte string.
1053 2; 255; 0; 0; 0x01FF00 *2; "S"; i8 201; s6 "Q256";
1054 (2; -1; 0; 0; 0; 0; s8 "") * 31;
1055 2; 4; 0; 0; 0x010400 *2; "S"; i8 201; "Q256_1";
1057 dnl 600-byte string.
1058 2; 255; 0; 0; 0x01FF00 *2; s8 "STR600";
1059 (2; -1; 0; 0; 0; 0; s8 "") * 31;
1060 2; 255; 0; 0; 0x01FF00 *2; s8 "STR600_1";
1061 (2; -1; 0; 0; 0; 0; s8 "") * 31;
1062 2; 96; 0; 0; 0x016000 *2; s8 "STR600_2";
1063 (2; -1; 0; 0; 0; 0; s8 "") * 11;
1065 dnl Machine integer info record.
1066 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
1068 dnl Very long string record.
1070 "S"; i8 201; "Q256=00256"; i8 0; i8 9;
1071 "STR600=00600"; i8 0; i8 9;
1074 dnl Character encoding record.
1075 7; 20; 1; 12; "windows-1252";
1077 dnl Dictionary termination record.
1081 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#" * 4;
1083 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#" * 9;
1084 "abcdefghijklmnopqrstuvwxyzABCDEF";
1087 "be 844a4704f669dfe292482e587d690133" \
1088 "le b76025f602bdff6a42c1e0795a8b62ff"
1091 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1093 AT_DATA([sys-file.sps], [dnl
1094 GET FILE='sys-file.sav'.
1098 AT_CHECK([pspp -o pspp.csv sys-file.sps])
1099 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1100 Variable,Description,,Position
1101 séq256,Format: A256,,1
1102 str600,Format: A600,,2
1106 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@a,abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyz
1111 AT_SETUP([data file and variable attributes])
1112 AT_KEYWORDS([sack synthetic system file positive])
1113 AT_DATA([sys-file.sack], [dnl
1115 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1117 2; dnl Nominal case size
1118 0; dnl Not compressed
1122 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1126 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR";
1127 2; 0; 0; 0; 0x050800 *2; s8 "SECONDVA";
1129 dnl Machine integer info record.
1130 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
1132 dnl Long variable names.
1134 "FIRSTVAR=FirstVariable"; i8 9;
1135 "SECONDVA=S"; i8 233; "condVariable"; i8 9;
1138 dnl Data file attributes record.
1140 "Attr1('Value1'"; i8 10; "''d"; i8 233; "claration''"; i8 10; ")";
1141 "S"; i8 233; "condAttr('123'"; i8 10; "'456'"; i8 10; ")";
1144 dnl Variable attributes record.
1147 "ad"; i8 232; "le('23'"; i8 10; "'34'"; i8 10; ")";
1148 "bert('123'"; i8 10; ")";
1149 "$@Role('1'"; i8 10; ")";
1150 "/S"; i8 233; "condVariable:";
1151 "xyzzy('quux'"; i8 10; ")";
1155 dnl Character encoding record.
1156 7; 20; 1; 12; "windows-1252";
1158 dnl Dictionary termination record.
1162 "be 7fff0c04f697adf45f55d8be4aaa8712" \
1163 "le 7331339199344aa58bc60d7d05d538a7"
1166 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1168 AT_DATA([sys-file.sps], [dnl
1169 GET FILE='sys-file.sav'.
1170 DISPLAY @ATTRIBUTES.
1172 AT_CHECK([pspp -o pspp.csv sys-file.sps])
1173 AT_CHECK([cat pspp.csv], [0],
1174 [[Variable,Description,
1175 FirstVariable,Custom attributes:,
1180 SécondVariable,Custom attributes:,
1183 Table: Custom data file attributes.
1186 Attr1[2],'déclaration'
1190 AT_DATA([sys-file.sps], [dnl
1191 GET FILE='sys-file.sav'.
1194 AT_CHECK([pspp -o pspp.csv sys-file.sps])
1195 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0],
1196 [[Variable,Description,,Position
1197 FirstVariable,Format: F8.0,,1
1199 ,Custom attributes:,,
1203 SécondVariable,Format: F8.0,,2
1204 ,Custom attributes:,,
1207 Table: Custom data file attributes.
1210 Attr1[2],'déclaration'
1217 AT_SETUP([variable roles])
1218 AT_KEYWORDS([sack synthetic system file positive])
1219 AT_DATA([sys-file.sack], [dnl
1221 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1223 7; dnl Nominal case size
1224 0; dnl Not compressed
1228 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1232 2; 0; 0; 0; 0x050800 *2; s8 "I";
1233 2; 0; 0; 0; 0x050800 *2; s8 "O";
1234 2; 0; 0; 0; 0x050800 *2; s8 "B";
1235 2; 0; 0; 0; 0x050800 *2; s8 "N";
1236 2; 0; 0; 0; 0x050800 *2; s8 "P";
1237 2; 0; 0; 0; 0x050800 *2; s8 "S";
1238 2; 0; 0; 0; 0x050800 *2; s8 "X";
1240 dnl Machine integer info record.
1241 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
1243 dnl Variable attributes record.
1245 "I:$@Role('0'"; i8 10; ")";
1246 "/O:$@Role('1'"; i8 10; ")";
1247 "/B:$@Role('2'"; i8 10; ")";
1248 "/N:$@Role('3'"; i8 10; ")";
1249 "/P:$@Role('4'"; i8 10; ")";
1250 "/S:$@Role('5'"; i8 10; ")";
1251 "/X:$@Role('6'"; i8 10; ")";
1254 dnl Character encoding record.
1255 7; 20; 1; 12; "windows-1252";
1257 dnl Dictionary termination record.
1261 "be b08b39cd005682f680d132d272f5158d" \
1262 "le 176e4ac91197f5cb8732258033cfabdc"
1265 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1267 AT_DATA([sys-file.sps], [dnl
1268 GET FILE='sys-file.sav'.
1271 AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [dnl
1272 warning: `sys-file.sav': Invalid role for variable x.
1274 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1275 warning: `sys-file.sav': Invalid role for variable x.
1277 Variable,Description,,Position
1294 AT_SETUP([compressed data])
1295 AT_KEYWORDS([sack synthetic system file positive])
1296 AT_DATA([sys-file.sack], [dnl
1298 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1300 6; dnl Nominal case size
1301 1; dnl Simple compression
1303 -1; dnl Unspecified number of cases.
1305 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1308 dnl Numeric variables.
1309 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1310 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
1312 dnl String variable.
1313 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
1314 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
1315 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
1316 2; -1; 0; 0; 0; 0; s8 "";
1318 dnl Dictionary termination record.
1321 dnl Compressed data.
1322 i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123";
1323 i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu";
1324 s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO";
1325 i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW";
1329 "be c0670e436b068f45710b98f6f7d01dc5" \
1330 "le 2e43a7f8861df4e714a192dfb3c8b2f4"
1333 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1335 AT_DATA([sys-file.sps], [dnl
1336 GET FILE='sys-file.sav'.
1340 AT_CHECK([pspp -o pspp.csv sys-file.sps])
1341 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1342 Variable,Description,,Position
1343 num1,Format: F8.0,,1
1344 num2,Format: F8.0,,2
1347 str15,Format: A15,,5
1350 num1,num2,str4,str8,str15
1351 -99,0,,abcdefgh,0123 @&t@
1352 .,151,jklm,nopqrstu,vwxyzABC @&t@
1353 1,2,DEFG,HIJKLMNO,PQRSTUV
1358 AT_SETUP([compressed data, zero bias])
1359 AT_KEYWORDS([sack synthetic system file positive])
1360 AT_DATA([sys-file.sack], [dnl
1362 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1364 6; dnl Nominal case size
1365 1; dnl Simple compression.
1367 -1; dnl Unspecified number of cases.
1369 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1372 dnl Numeric variables.
1373 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1374 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
1376 dnl String variable.
1377 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
1378 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
1379 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
1380 2; -1; 0; 0; 0; 0; s8 "";
1382 dnl Dictionary termination record.
1385 dnl Compressed data.
1386 i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123";
1387 i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu";
1388 s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO";
1389 i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW";
1393 "be 2f0d25704ee497ae833213a3e4ff5e8b" \
1394 "le 49f68a9e1ba02a2f7e9166686a0db9d9"
1397 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1399 AT_DATA([sys-file.sps], [dnl
1400 GET FILE='sys-file.sav'.
1404 AT_CHECK([pspp -o pspp.csv sys-file.sps], [0])
1405 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1406 Variable,Description,,Position
1407 num1,Format: F8.0,,1
1408 num2,Format: F8.0,,2
1411 str15,Format: A15,,5
1414 num1,num2,str4,str8,str15
1415 1,100,,abcdefgh,0123 @&t@
1416 .,251,jklm,nopqrstu,vwxyzABC @&t@
1417 101,102,DEFG,HIJKLMNO,PQRSTUV
1422 AT_SETUP([compressed data, other bias])
1423 AT_KEYWORDS([sack synthetic system file positive])
1424 AT_DATA([sys-file.sack], [dnl
1426 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1428 6; dnl Nominal case size
1429 1; dnl Simple compression.
1431 -1; dnl Unspecified number of cases.
1433 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1436 dnl Numeric variables.
1437 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1438 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
1440 dnl String variable.
1441 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
1442 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
1443 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
1444 2; -1; 0; 0; 0; 0; s8 "";
1446 dnl Dictionary termination record.
1449 dnl Compressed data.
1450 i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123";
1451 i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu";
1452 s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO";
1453 i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW";
1457 "be 668b85e3dee0797883e9933a096b8c18" \
1458 "le 5e7a9c4e88cd2dbc2322943da663868e"
1461 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1463 AT_DATA([sys-file.sps], [dnl
1464 GET FILE='sys-file.sav'.
1468 AT_CHECK([pspp -o pspp.csv sys-file.sps], [0],
1469 [warning: `sys-file.sav' near offset 0x54: Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format.
1471 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1472 "warning: `sys-file.sav' near offset 0x54: Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format."
1474 Variable,Description,,Position
1475 num1,Format: F8.0,,1
1476 num2,Format: F8.0,,2
1479 str15,Format: A15,,5
1482 num1,num2,str4,str8,str15
1483 -49,50,,abcdefgh,0123 @&t@
1484 .,201,jklm,nopqrstu,vwxyzABC @&t@
1485 51,52,DEFG,HIJKLMNO,PQRSTUV
1490 m4_divert_push([PREPARE_TESTS])
1491 zcompressed_sack () {
1494 "$FL3"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1496 6; dnl Nominal case size
1497 2; dnl zlib compressed
1499 -1; dnl Unspecified number of cases.
1501 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1504 dnl Numeric variables.
1505 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1506 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
1508 dnl String variable.
1509 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
1510 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
1511 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
1512 2; -1; 0; 0; 0; 0; s8 "";
1514 dnl Dictionary termination record.
1517 dnl ZLIB data header.
1518 i64 0x178; # zheader_ofs
1519 i64 0x1e9; # ztrailer_ofs
1520 i64 48; # ztrailer_len
1522 dnl ZLIB data block.
1524 dnl This is the compressed form of:
1526 dnl 01 64 fe fd fe fd ff fb 61 62 63 64 65 66 67 68 |.d......abcdefgh|
1527 dnl 30 31 32 33 20 20 20 20 fd fd fd fe 65 66 fd fd |0123 ....ef..|
1528 dnl 6a 6b 6c 6d 20 20 20 20 6e 6f 70 71 72 73 74 75 |jklm nopqrstu|
1529 dnl 76 77 78 79 7a 41 42 43 44 45 46 47 20 20 20 20 |vwxyzABCDEFG |
1530 dnl 48 49 4a 4b 4c 4d 4e 4f fe fd fc 00 00 00 00 00 |HIJKLMNO........|
1531 dnl 50 51 52 53 54 55 56 57 |PQRSTUVW|
1533 dnl which is the data from the "compressed data" test.
1534 hex "78 01 63 4c f9 f7 f7 df df ff bf 13 93 92 53 52";
1535 hex "d3 d2 33 0c 0c 8d 8c 15 80 e0 ef df bf ff 52 d3";
1536 hex "fe fe cd ca ce c9 05 f1 f3 f2 0b 0a 8b 8a 4b 4a";
1537 hex "cb ca 2b 2a ab 1c 9d 9c 5d 5c dd dc 41 e2 1e 9e";
1538 hex "5e de 3e be 7e fe ff fe fe 61 00 81 80 c0 a0 e0";
1539 hex "90 d0 b0 70 00 0f 3f 23 d7";
1541 dnl ZLIB data trailer fixed header:
1542 i64 -100; # ztrailer_bias
1543 i64 0; # ztrailer_zero
1544 0x3ff000; # block_size
1547 dnl ZLIB block descriptor:
1548 i64 0x178; # uncompressed_ofs
1549 i64 0x190; # compressed_ofs
1550 88; # uncompressed_size
1551 89; # compressed_size
1554 m4_divert_pop([PREPARE_TESTS])
1556 AT_SETUP([zcompressed data])
1557 AT_KEYWORDS([sack synthetic system file positive zlib])
1558 zcompressed_sack > sys-file.sack
1560 "be 2d706c3ca0cc9be7f1721f09d0d42179" \
1561 "le 3f362f338d65b0a836b3c752cc3fc5bc"
1564 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1566 AT_DATA([sys-file.sps], [dnl
1567 GET FILE='sys-file.sav'.
1571 AT_CHECK([pspp -o pspp.csv sys-file.sps])
1572 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1573 Variable,Description,,Position
1574 num1,Format: F8.0,,1
1575 num2,Format: F8.0,,2
1578 str15,Format: A15,,5
1581 num1,num2,str4,str8,str15
1582 -99,0,,abcdefgh,0123 @&t@
1583 .,151,jklm,nopqrstu,vwxyzABC @&t@
1584 1,2,DEFG,HIJKLMNO,PQRSTUV
1589 AT_BANNER([system file reader - negative])
1591 AT_SETUP([misplaced type 4 record])
1592 AT_KEYWORDS([sack synthetic system file negative])
1593 AT_DATA([sys-file.sack], [dnl
1595 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1596 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1598 dnl Numeric variable.
1599 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1605 "be 6e0bb549fff1fd1af333d51b8a6e0f43" \
1606 "le 7b62734edcee2a1689c463f2866d11b8"
1609 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1611 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1613 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1614 [error: `sys-file.sav' near offset 0xd4: Misplaced type 4 record.
1619 AT_SETUP([bad record type])
1620 AT_KEYWORDS([sack synthetic system file negative])
1621 AT_DATA([sys-file.sack], [dnl
1623 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1624 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1626 dnl Numeric variable.
1627 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1629 dnl Type 8 record (not a valid type).
1633 "be dc8f078c23046ee7db74ec1003178a11" \
1634 "le dc7f111642f0629f4370630fd092eee3"
1637 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1639 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1641 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1642 [error: `sys-file.sav' near offset 0xd4: Unrecognized record type 8.
1647 AT_SETUP([wrong number of variable positions])
1648 AT_KEYWORDS([sack synthetic system file negative])
1649 AT_DATA([sys-file.sack], [dnl
1651 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1652 2; >>2<<; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1654 dnl Numeric variable.
1655 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1657 dnl End of dictionary.
1661 "be c57e91aa426f61813c3ad91ea3a56dda" \
1662 "le 5d1a6c114b135b219473c8ad5bb44bda"
1665 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1667 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1669 AT_CHECK([pspp -O format=csv sys-file.sps], [0],
1670 [warning: `sys-file.sav': File header claims 2 variable positions but 1 were read from file.
1675 AT_SETUP([variable name may not begin with `#'])
1676 AT_KEYWORDS([sack synthetic system file negative])
1677 AT_DATA([sys-file.sack], [dnl
1679 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1680 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1682 dnl Numeric variable.
1683 2; 0; 0; 0; 0x050800 *2; s8 >>"$UM1"<<;
1685 dnl End of dictionary.
1689 "be decb7ac6defa1ab3cc7a386d1843c1ae" \
1690 "le 5279b6275633bac55d167faebccfdb14"
1693 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1695 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1697 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1698 [error: `sys-file.sav' near offset 0xb4: Invalid variable name `$UM1'.
1703 AT_SETUP([variable name may not be reserved word])
1704 AT_KEYWORDS([sack synthetic system file negative])
1705 AT_DATA([sys-file.sack], [dnl
1707 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1708 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1710 dnl Numeric variable.
1711 2; 0; 0; 0; 0x050800 *2; s8 >>"TO"<<;
1713 dnl End of dictionary.
1717 "be 57e6ad709668bbf538e2efee4af49916" \
1718 "le 523f14b611efa380bbadf7a16ea43fed"
1721 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1723 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1725 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1726 [error: `sys-file.sav' near offset 0xb4: Invalid variable name `TO'.
1731 AT_SETUP([variable width must be between 0 and 255])
1732 AT_KEYWORDS([sack synthetic system file negative])
1733 AT_DATA([sys-file.sack], [dnl
1735 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1736 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1738 dnl String variable with invalid width 256.
1739 2; 256; 0; 0; 0x050800 *2; s8 "VAR1";
1741 dnl End of dictionary.
1745 "be 170bb18589ba264a0ed2d57b41fe77e1" \
1746 "le 9528b4b5936ef5630bbd3bdd60a123c3"
1749 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1751 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1753 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1754 [error: `sys-file.sav' near offset 0xb4: Bad width 256 for variable VAR1.
1759 dnl SPSS-generated system file can contain duplicate variable names
1760 dnl (see bug #41475).
1761 AT_SETUP([duplicate variable name])
1762 AT_KEYWORDS([sack synthetic system file negative])
1763 AT_DATA([sys-file.sack], [dnl
1765 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1766 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1768 dnl Numeric variables.
1769 2; 0; 0; 0; 0x050800 *2; s8 "VAR1";
1770 2; 0; 0; 0; 0x050800 *2; s8 "VAR1";
1772 dnl End of dictionary.
1776 "be d8f5fd768ab1d641f9330a4840c71343" \
1777 "le f01e123d384cdaa7c2f7fc4791325ebf"
1780 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1782 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1785 AT_CHECK([pspp -O format=csv sys-file.sps], [0],
1786 [warning: `sys-file.sav' near offset 0xd4: Renaming variable with duplicate name `VAR1' to `VAR001'.
1788 Variable,Description,,Position
1789 var1,Format: F8.0,,1
1791 ,Display Alignment: Right,,
1793 var001,Format: F8.0,,2
1795 ,Display Alignment: Right,,
1801 AT_SETUP([variable label indicator not 0 or 1])
1802 AT_KEYWORDS([sack synthetic system file negative])
1803 AT_DATA([sys-file.sack], [dnl
1805 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1806 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1808 dnl Numeric variable.
1809 2; 0; >>2<<; 0; 0x050800 *2; s8 "VAR1";
1811 dnl End of dictionary.
1815 "be 3c5ff8d8f146457a385ca92d3d23ca8a" \
1816 "le 37e9f956d321ae57b0bf7fe2384e892b"
1819 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1821 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1823 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1824 [error: `sys-file.sav' near offset 0xb4: Variable label indicator field is not 0 or 1.
1829 AT_SETUP([invalid numeric missing value indicator])
1830 AT_KEYWORDS([sack synthetic system file negative])
1831 AT_DATA([sys-file.sack], [dnl
1833 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1834 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1836 dnl Numeric variable.
1837 2; 0; 0; >>-1<<; 0x050800 *2; s8 "VAR1";
1839 dnl End of dictionary.
1843 "be d1d0d4aedf9f053452c4b1e658ade5e2" \
1844 "le df697575499fe12921185a3d23a5d61d"
1847 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1849 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1851 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1852 ["error: `sys-file.sav' near offset 0xb4: Numeric missing value indicator field is not -3, -2, 0, 1, 2, or 3."
1857 AT_SETUP([invalid string missing value indicator])
1858 AT_KEYWORDS([sack synthetic system file negative])
1859 AT_DATA([sys-file.sack], [dnl
1861 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1862 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1864 dnl String variable.
1865 2; 8; 0; >>4<<; 0x010800 *2; s8 "VAR1";
1867 dnl End of dictionary.
1871 "be f833033be7b102fae19159989f62faa6" \
1872 "le 9704ba828bb7a36ef0262838f6b7936b"
1875 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1877 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1879 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1880 ["error: `sys-file.sav' near offset 0xb4: String missing value indicator field is not 0, 1, 2, or 3."
1885 AT_SETUP([missing string continuation record])
1886 AT_KEYWORDS([sack synthetic system file negative])
1887 AT_DATA([sys-file.sack], [dnl
1889 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1890 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1892 dnl String variable.
1893 2; 10; 0; 0; 0x010a00 *2; s8 "VAR1";
1894 >>2; 0; 0; 0; 0x050800 *2; s8 "VAR2";<<
1896 dnl End of dictionary.
1900 "be c8f9ad2b2acd2918055e2b78c1e0b4b8" \
1901 "le 1afab4d6aee90a6fe8d2dbf229e06409"
1904 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1906 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1908 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1909 [error: `sys-file.sav' near offset 0xb4: Missing string continuation record.
1914 AT_SETUP([invalid variable format])
1915 AT_KEYWORDS([sack synthetic system file negative])
1916 AT_DATA([sys-file.sack], [dnl
1918 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1919 2; 4; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1921 dnl Numeric variable, invalid format types.
1922 dnl No warning is issued for type 0 because it has been observed in real
1924 2; 0; 0; 0; >>0xff0800; 0<<; s8 "NUM1";
1926 dnl Numeric variable, string formats.
1927 2; 0; 0; 0; >>0x010800<<; >>0x021000<<; s8 "VAR1";
1929 dnl String variable, numeric formats.
1930 2; 4; 0; 0; >>0x050800<<; >>0x110a01<<; s8 "STR1";
1932 dnl String variable, wrong width formats.
1933 2; 4; 0; 0; >>0x010800<<; >>0x020400<<; s8 "STR2";
1935 dnl End of dictionary.
1939 "be c6ef5d8fded46443aba89adfafe15cad" \
1940 "le fccaf1764c973892f2d5adbcc2c36fb7"
1943 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1945 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1947 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
1948 warning: `sys-file.sav' near offset 0xc0: Variable NUM1 with width 0 has invalid print format 0xff0800.
1950 warning: `sys-file.sav' near offset 0xe0: Variable VAR1 with width 0 has invalid print format 0x10800.
1952 warning: `sys-file.sav' near offset 0xe4: Variable VAR1 with width 0 has invalid write format 0x21000.
1954 warning: `sys-file.sav' near offset 0x100: Variable STR1 with width 4 has invalid print format 0x50800.
1956 warning: `sys-file.sav' near offset 0x104: Variable STR1 with width 4 has invalid write format 0x110a01.
1958 warning: `sys-file.sav' near offset 0x120: Variable STR2 with width 4 has invalid print format 0x10800.
1960 warning: `sys-file.sav' near offset 0x124: Variable STR2 with width 4 has invalid write format 0x20400.
1965 AT_SETUP([invalid long string missing values])
1966 AT_KEYWORDS([sack synthetic system file negative])
1967 AT_DATA([sys-file.sack], [dnl
1969 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1971 7; dnl Nominal case size
1972 0; dnl Not compressed
1976 "01 Jan 11"; "20:53:52";
1977 "PSPP synthetic test file: "; i8 244; i8 245; i8 246; i8 248; s34 "";
1980 dnl One numeric variable.
1981 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1983 dnl Long string variables that will have missing values added with a
1985 2; 9; 0; 0; 0x010900 *2; s8 "STR1";
1986 2; -1; 0; 0; 0; 0; s8 "";
1987 2; 10; 0; 0; 0x010a00 *2; s8 "STR2";
1988 2; -1; 0; 0; 0; 0; s8 "";
1989 2; 11; 0; 0; 0x010b00 *2; s8 "STR3";
1990 2; -1; 0; 0; 0; 0; s8 "";
1992 dnl Machine integer info record.
1993 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
1995 dnl Machine floating-point info record.
1996 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST;
1998 dnl Long string variable missing values record.
2000 dnl Zero missing values (not allowed) for STR1 .
2001 COUNT("STR1"); i8 >>0<<;
2003 dnl Four missing values (not allowed) for STR2.
2004 COUNT("STR2"); i8 4;
2005 8; "abcdefgh"; 8; "ijklmnop"; 8; "qrstuvwx"; 8; "yz012345";
2007 dnl Missing values for unknown variable
2008 COUNT(>>"Nonexistent"<<); i8 1; 8; "abcdefgh";
2010 dnl Missing values for numeric variable
2011 COUNT(>>"NUM1"<<); i8 1; 8; "abcdefgh";
2013 dnl Too long missing value
2014 COUNT("STR3"); i8 1; >>COUNT("abcdefghijkl")<<;
2017 dnl Character encoding record.
2018 7; 20; 1; 12; "windows-1252";
2020 dnl Dictionary termination record.
2022 s8 "abcd"; s8 "efgh"; s8 "ijkl"; s8 "mnop"; s8 "qrst"; s8 "uvwx";
2023 s16 "yzABCDEFGHI"; s16 "JKLMNOPQR"; s16 "STUVWXYZ01";
2024 s16 "23456789abc"; s32 "defghijklmnopqstuvwxyzABC";
2028 "be 26e815cfb41eaedb435ea3c81b96215c" \
2029 "le 72d70456bd4dc88bb0a0fdb039ccdfa3"
2032 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2034 AT_DATA([sys-file.sps], [dnl
2035 GET FILE='sys-file.sav'.
2038 AT_CHECK([pspp -O format=csv sys-file.sps], [0],
2039 ["warning: `sys-file.sav' near offset 0x1f8: Long string missing values record says variable STR1 has 0 missing values, but only 1 to 3 missing values are allowed."
2041 "warning: `sys-file.sav' near offset 0x201: Long string missing values record says variable STR2 has 4 missing values, but only 1 to 3 missing values are allowed."
2043 warning: `sys-file.sav' near offset 0x242: Ignoring long string missing value record for unknown variable Nonexistent.
2045 warning: `sys-file.sav' near offset 0x257: Ignoring long string missing value record for numeric variable NUM1.
2047 "warning: `sys-file.sav' near offset 0x270: Ignoring long string missing value 0 for variable str3, with width 11, that has bad value width 12."
2049 Variable,Description,,Position
2050 num1,Format: F8.0,,1
2052 ,Display Alignment: Right,,
2056 ,Display Alignment: Left,,
2060 ,Display Alignment: Left,,
2061 ,Display Width: 10,,
2062 ,"Missing Values: ""abcdefgh""; ""ijklmnop""; ""qrstuvwx""",,
2065 ,Display Alignment: Left,,
2066 ,Display Width: 11,,
2071 AT_SETUP([weighting variable must be numeric])
2072 AT_KEYWORDS([sack synthetic system file negative])
2073 AT_DATA([sys-file.sack], [dnl
2075 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2076 2; 2; 1; >>2<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2078 dnl Numeric variable.
2079 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2081 dnl String variable.
2082 2; 4; 0; 0; 0x010400 *2; s8 "STR1";
2084 dnl End of dictionary.
2088 "be 82d30105e46c4896c24f9dcec26c4749" \
2089 "le 32e235119be70050eb78bf4186a5a046"
2092 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2094 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2097 AT_CHECK([pspp -O format=csv sys-file.sps], [0],
2098 [warning: `sys-file.sav': Ignoring string variable `STR1' set as weighting variable.
2100 Variable,Description,,Position
2101 num1,Format: F8.0,,1
2103 ,Display Alignment: Right,,
2107 ,Display Alignment: Left,,
2113 AT_SETUP([bad weighting variable index])
2114 AT_KEYWORDS([sack synthetic system file negative])
2115 AT_DATA([sys-file.sack], [dnl
2117 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2118 2; 2; 1; >>3<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2120 dnl Numeric variable.
2121 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2123 dnl String variable.
2124 2; 4; 0; 0; 0x010400 *2; s8 "STR1";
2126 dnl End of dictionary.
2130 "be cd9af924ff20bc75834aa2c696254c97" \
2131 "le cbe0f2f514f5e95f27644d0b4314bc78"
2134 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2136 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2138 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
2139 [error: `sys-file.sav' near offset 0x4c: Variable index 3 not in valid range 1...2.
2144 AT_SETUP([variable index is long string contination])
2145 AT_KEYWORDS([sack synthetic system file negative])
2146 AT_DATA([sys-file.sack], [dnl
2148 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2149 2; 3; 1; >>3<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2151 dnl Numeric variable.
2152 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2154 dnl Long string variable.
2155 2; 9; 0; 0; 0x010900 *2; s8 "STR1";
2156 (2; -1; 0; 0; 0; 0; s8 "");
2158 dnl End of dictionary.
2162 "be e47d2d0e65846a9b534e004f0ae65083" \
2163 "le e5e6e00f34c4697c7bee21f15f86c7e3"
2166 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2168 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2170 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
2171 [error: `sys-file.sav' near offset 0x4c: Variable index 3 refers to long string continuation.
2176 AT_SETUP([multiple documents records])
2177 AT_KEYWORDS([sack synthetic system file negative])
2178 AT_DATA([sys-file.sack], [dnl
2180 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2181 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2183 dnl Numeric variable, no label or missing values.
2184 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2186 dnl Two document records.
2187 (6; 1; s80 "One line of documents") >>* 2<<;
2189 dnl Dictionary termination record.
2196 "be 18aa3348a216ed494efe28285b348fa8" \
2197 "le 19b21522bcef1dcc60af328f923f307e"
2200 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2202 AT_DATA([sys-file.sps], [dnl
2203 GET FILE='sys-file.sav'.
2205 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2206 error: `sys-file.sav' near offset 0x12c: Duplicate type 6 (document) record.
2212 AT_SETUP([empty document record])
2213 AT_KEYWORDS([sack synthetic system file negative])
2214 AT_DATA([sys-file.sack], [dnl
2216 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2217 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2219 dnl Numeric variable, no label or missing values.
2220 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2222 dnl Empty document record.
2225 dnl Dictionary termination record.
2232 "be d8ef29c1b97f9ed226cbd938c9c49b6e" \
2233 "le f6a560c5b62e2c472429d85294f36e61"
2236 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2238 AT_DATA([sys-file.sps], [dnl
2239 GET FILE='sys-file.sav'.
2241 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2242 error: `sys-file.sav' near offset 0xd4: Number of document lines (0) must be greater than 0 and less than 26843545.
2247 AT_SETUP([extension record too large])
2248 AT_KEYWORDS([sack synthetic system file negative])
2249 AT_DATA([sys-file.sack], [dnl
2251 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2252 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2254 dnl Numeric variable, no label or missing values.
2255 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2257 dnl Too-large extension record.
2258 7; 3; >>0xfffff000 * 2<<;
2261 "be 5a6679dc41ac349b0b73fc430937c05c" \
2262 "le d4769c7f650cfbf160e0386d0d33be04"
2265 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2267 AT_DATA([sys-file.sps], [dnl
2268 GET FILE='sys-file.sav'.
2270 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2271 error: `sys-file.sav' near offset 0xd8: Record type 7 subtype 3 too large.
2276 AT_SETUP([unknown extension record])
2277 AT_KEYWORDS([sack synthetic system file negative])
2278 AT_DATA([sys-file.sack], [dnl
2280 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2281 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2283 dnl Numeric variable, no label or missing values.
2284 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2286 dnl Unknown extension record type.
2289 dnl End of dictionary.
2293 "be ac8395e27677408189bcb8655e56cc0e" \
2294 "le e308bfcd51f1e3c28d7379c29271f9d6"
2297 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2299 AT_DATA([sys-file.sps], [dnl
2300 GET FILE='sys-file.sav'.
2302 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2303 "warning: `sys-file.sav' near offset 0xd8: Unrecognized record type 7, subtype 30. Please send a copy of this file, and the syntax which created it to bug-gnu-pspp@gnu.org."
2308 AT_SETUP([bad machine integer info size])
2309 AT_KEYWORDS([sack synthetic system file negative])
2310 AT_DATA([sys-file.sack], [dnl
2312 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2313 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2315 dnl Numeric variable, no label or missing values.
2316 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2318 dnl Machine integer info record.
2319 7; 3; 4; >>9<<; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; >>1234<<;
2321 dnl End of dictionary.
2325 "be 21ec84826886b0a266d1360f8279d769" \
2326 "le 15dcba7b2b89b7d8a21ebcc872f515af"
2329 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
2330 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2332 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2333 "warning: `sys-file.sav' near offset 0xd8: Record type 7, subtype 3 has bad count 9 (expected 8)."
2338 AT_SETUP([bad machine integer info float format])
2339 AT_KEYWORDS([sack synthetic system file negative])
2340 AT_DATA([sys-file.sack], [dnl
2342 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2343 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2345 dnl Numeric variable, no label or missing values.
2346 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2348 dnl Machine integer info record.
2349 7; 3; 4; 8; 1; 2; 3; -1; >>2<<; 1; ENDIAN; 1252;
2351 dnl End of dictionary.
2355 "be d510ed28278649eee997fb6881a4c04f" \
2356 "le fbf1eca561a4e243b7ae844ed1677035"
2359 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
2360 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2362 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2363 error: `sys-file.sav' near offset 0xd8: Floating-point representation indicated by system file (2) differs from expected (1).
2368 AT_SETUP([bad machine integer info endianness])
2369 AT_KEYWORDS([sack synthetic system file negative])
2370 AT_DATA([sys-file.sack], [dnl
2372 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2373 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2375 dnl Numeric variable, no label or missing values.
2376 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2378 dnl Machine integer info record.
2379 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; >>3<<; 1252;
2381 dnl End of dictionary.
2385 "be 855123d16d5e1560b91d60753dad79ad 1" \
2386 "le d6626b4fa2e46a91f26c2fc609b2f1e0 2"
2389 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2391 AT_DATA([sys-file.sps], [dnl
2392 GET FILE='sys-file.sav'.
2395 AT_CHECK_UNQUOTED([pspp -O format=csv sys-file.sps], [0], [dnl
2396 warning: \`sys-file.sav' near offset 0xd8: Integer format indicated by system file (3) differs from expected ($[3]).
2398 Variable,Description,,Position
2399 num1,Format: F8.0,,1
2401 ,Display Alignment: Right,,
2408 AT_SETUP([bad machine floating-point info size])
2409 AT_KEYWORDS([sack synthetic system file negative])
2410 AT_DATA([sys-file.sack], [dnl
2412 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2413 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2415 dnl Numeric variable, no label or missing values.
2416 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2418 dnl Machine floating-point info record.
2419 7; 4; 8; >>4<<; SYSMIS; HIGHEST; LOWEST; 0.0;
2421 dnl End of dictionary.
2425 "be 29c9a173638fbb8bb1efe1176c4d670f" \
2426 "le 5cb49eb1084e5b9cd573a54705ff86a7"
2429 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
2430 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2432 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2433 "warning: `sys-file.sav' near offset 0xd8: Record type 7, subtype 4 has bad count 4 (expected 3)."
2438 AT_SETUP([wrong special floating point values])
2439 AT_KEYWORDS([sack synthetic system file negative])
2440 AT_DATA([sys-file.sack], [dnl
2442 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2443 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2445 dnl Numeric variable, no label or missing values.
2446 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2448 dnl Machine floating-point info record.
2449 7; 4; 8; 3; >>0.0<<; >>1.0<<; >>2.0<<;
2451 dnl End of dictionary.
2455 "be 1e7452d9bb0a2397bf6084a25437514e" \
2456 "le f59f9a83f723cde1611869ff6d91d325"
2459 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2461 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2463 AT_CHECK([pspp -O format=csv sys-file.sps | sed 's/ [(].*/.../'], [0], [dnl
2464 "warning: `sys-file.sav' near offset 0xd8: File specifies unexpected value 0...
2466 "warning: `sys-file.sav' near offset 0xd8: File specifies unexpected value 1...
2468 "warning: `sys-file.sav' near offset 0xd8: File specifies unexpected value 2...
2473 AT_SETUP([bad mrsets name])
2474 AT_KEYWORDS([sack synthetic system file negative multiple response])
2475 AT_DATA([sys-file.sack], [dnl
2477 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2479 16; dnl Nominal case size
2480 0; dnl Not compressed
2484 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
2488 2; 0; 0; 0; 0x050800 *2; i8 0x82; i8 0xa0; s6 "";
2489 2; 0; 0; 0; 0x050800 *2; s8 "B";
2490 2; 0; 0; 0; 0x050800 *2; s8 "C";
2493 2; 0; 0; 0; 0x050800 *2; s8 "D";
2494 2; 0; 0; 0; 0x050800 *2; s8 "E";
2495 2; 0; 0; 0; 0x050800 *2; s8 "F";
2496 2; 0; 0; 0; 0x050800 *2; s8 "G";
2499 2; 4; 0; 0; 0x010400 *2; s8 "H";
2500 2; 4; 0; 0; 0x010400 *2; s8 "I";
2501 2; 4; 0; 0; 0x010400 *2; s8 "J";
2504 2; 0; 0; 0; 0x050800 *2; s8 "K";
2505 2; 0; 0; 0; 0x050800 *2; s8 "L";
2506 2; 0; 0; 0; 0x050800 *2; s8 "M";
2509 2; 6; 0; 0; 0x010600 *2; s8 "N";
2510 2; 6; 0; 0; 0x010600 *2; s8 "O";
2511 2; 6; 0; 0; 0x010600 *2; s8 "P";
2513 dnl Machine integer info record.
2514 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 932;
2518 "$a=C 10 my mcgroup "; i8 0x82; i8 0xa0; " b c"; i8 10;
2519 "b=D2 55 0 g e f d"; i8 10;
2520 "$c=D4 "; i8 0x82; i8 0xcd; i8 0x82; i8 0xa2; " 10 mdgroup #2 h i j"; i8 10);
2524 "$d=E 1 2 34 13 third mdgroup k l m"; i8 10;
2525 "e=E 11 6 choice 0 n o p"; i8 10);
2527 dnl Character encoding record.
2528 7; 20; 1; 9; "shift_jis";
2530 dnl Dictionary termination record.
2534 "be 8832b331e09557a1ac0bf4e31611428a" \
2535 "le 1c1dcd9930864632402b5c635395cb51"
2538 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2540 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2541 MRSETS /DISPLAY NAME=ALL.
2543 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2544 warning: `sys-file.sav': Multiple response set name `b' does not begin with `$'.
2546 warning: `sys-file.sav': Multiple response set name `e' does not begin with `$'.
2548 Table: Multiple Response Sets
2549 Name,Variables,Details
2553 ","Multiple category set
2559 ","Multiple dichotomy set
2561 Label source: Provided by user
2563 Category label source: Variable labels
2568 ","Multiple dichotomy set
2569 Label: third mdgroup
2570 Label source: Provided by user
2572 Category label source: Value labels of counted value
2578 AT_SETUP([missing space after C in mrsets])
2579 AT_KEYWORDS([sack synthetic system file negative multiple response])
2580 AT_DATA([sys-file.sack], [dnl
2582 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2583 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2585 dnl Numeric variable, no label or missing values.
2586 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2588 dnl Multiple response sets.
2589 7; 7; 1; COUNT("$a=Cx");
2594 "be c5e5656ba3d74c3a967850f29ad89970" \
2595 "le 29f110509c3d6893a7d21ae2d66aad9d"
2598 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2600 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2602 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2603 warning: `sys-file.sav' near offset 0xd8: Missing space following `C' at offset 4 in MRSETS record.
2608 AT_SETUP([missing space after E in mrsets])
2609 AT_KEYWORDS([sack synthetic system file negative multiple response])
2610 AT_DATA([sys-file.sack], [dnl
2612 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2613 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2615 dnl Numeric variable, no label or missing values.
2616 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2618 dnl Multiple response sets.
2619 7; 7; 1; COUNT("$a=Ex");
2624 "be a9e1dc63e2524882a5e3d2949a2da9d4" \
2625 "le ac709ca1928f65f47a8c8efdd9454b50"
2628 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2630 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2632 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2633 warning: `sys-file.sav' near offset 0xd8: Missing space following `E' at offset 4 in MRSETS record.
2638 AT_SETUP([unexpected label source in mrsets])
2639 AT_KEYWORDS([sack synthetic system file negative multiple response])
2640 AT_DATA([sys-file.sack], [dnl
2642 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2643 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2645 dnl Numeric variable, no label or missing values.
2646 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2648 dnl Multiple response sets.
2649 7; 7; 1; COUNT("$a=E 2");
2654 "be 8c710e85a0a1609d0d03dec80aaf5f94" \
2655 "le 4682440b82f22d4bd2ac56afb7fa3152"
2658 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2660 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2662 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2663 warning: `sys-file.sav' near offset 0xd8: Unexpected label source value following `E' at offset 7 in MRSETS record.
2665 warning: `sys-file.sav' near offset 0xd8: Expecting digit at offset 7 in MRSETS record.
2670 AT_SETUP([bad type character in mrsets])
2671 AT_KEYWORDS([sack synthetic system file negative multiple response])
2672 AT_DATA([sys-file.sack], [dnl
2674 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2675 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2677 dnl Numeric variable, no label or missing values.
2678 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2680 dnl Multiple response sets.
2681 7; 7; 1; COUNT("$a=");
2686 "be fc5e5200d8f56b9a5a713e4a95313a3b" \
2687 "le 578a61e8a06b20216612f566c2050879"
2690 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2692 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2694 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2695 "warning: `sys-file.sav' near offset 0xd8: Missing `C', `D', or `E' at offset 3 in MRSETS record."
2700 AT_SETUP([bad counted string length in mrsets])
2701 AT_KEYWORDS([sack synthetic system file negative multiple response])
2702 AT_DATA([sys-file.sack], [dnl
2704 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2705 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2707 dnl Numeric variable, no label or missing values.
2708 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2710 dnl Multiple response sets.
2711 7; 7; 1; COUNT("$a=Dx");
2716 "be 23d0e2f65c7c5f93bbedcc0f2b260c69" \
2717 "le c3860c1d80e08842264948056e72c0db"
2720 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2722 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2724 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2725 warning: `sys-file.sav' near offset 0xd8: Expecting digit at offset 4 in MRSETS record.
2730 AT_SETUP([missing space in counted string in mrsets])
2731 AT_KEYWORDS([sack synthetic system file negative multiple response])
2732 AT_DATA([sys-file.sack], [dnl
2734 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2735 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2737 dnl Numeric variable, no label or missing values.
2738 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2740 dnl Multiple response sets.
2741 7; 7; 1; COUNT("$a=D1x");
2746 "be c9ce001723763e0698878b7e43a887e8" \
2747 "le e258a1e4491d5a1d1e7d2272ef631a22"
2750 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2752 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2754 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2755 warning: `sys-file.sav' near offset 0xd8: Expecting space at offset 5 in MRSETS record.
2760 AT_SETUP([counted string too long in mrsets])
2761 AT_KEYWORDS([sack synthetic system file negative multiple response])
2762 AT_DATA([sys-file.sack], [dnl
2764 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2765 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2767 dnl Numeric variable, no label or missing values.
2768 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2770 dnl Multiple response sets.
2771 7; 7; 1; COUNT("$a=D4 abc");
2776 "be 196d1266fa0e8e315769dcbe3130e3df" \
2777 "le 23df1ba7b77a26da8ce1c2cfbcaadce0"
2780 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2782 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2784 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2785 warning: `sys-file.sav' near offset 0xd8: 4-byte string starting at offset 6 exceeds record length 9.
2790 AT_SETUP([missing space after counted string in mrsets])
2791 AT_KEYWORDS([sack synthetic system file negative multiple response])
2792 AT_DATA([sys-file.sack], [dnl
2794 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2795 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2797 dnl Numeric variable, no label or missing values.
2798 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2800 dnl Multiple response sets.
2801 7; 7; 1; COUNT("$a=D3 abcx");
2806 "be 86314bb0bbdfad48c10af8b8d8106d6e" \
2807 "le 2b8d05ff501ca78e51f7110ce88a2364"
2810 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2812 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2814 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2815 warning: `sys-file.sav' near offset 0xd8: Expecting space at offset 9 following 3-byte string.
2820 AT_SETUP([missing newline after variable name in mrsets])
2821 AT_KEYWORDS([sack synthetic system file negative multiple response])
2822 AT_DATA([sys-file.sack], [dnl
2824 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2825 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2827 dnl Numeric variable, no label or missing values.
2828 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2830 dnl Multiple response sets.
2831 7; 7; 1; COUNT("$a=C 0 NUM1");
2836 "be cea939cf3e6a5f88cb45e8fa871c5e13" \
2837 "le 52135afec082f50f37eafacadbb2cd65"
2840 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2842 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2844 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2845 warning: `sys-file.sav' near offset 0xd8: Missing new-line parsing variable names at offset 13 in MRSETS record.
2847 warning: `sys-file.sav': MRSET $a has only one variable.
2852 AT_SETUP([duplicate variable name in mrsets])
2853 AT_KEYWORDS([sack synthetic system file negative multiple response])
2854 AT_DATA([sys-file.sack], [dnl
2856 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2857 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2859 dnl Numeric variable, no label or missing values.
2860 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2862 dnl Multiple response sets.
2863 7; 7; 1; COUNT("$a=C 0 NUM1 NUM1"; i8 10);
2868 "be 4b1b5fa2dc22cf0afdd35422290b0a29" \
2869 "le e4304b57976440a036f25f8dd8ac1404"
2872 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2874 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2876 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2877 warning: `sys-file.sav': MRSET $a contains duplicate variable name NUM1.
2879 warning: `sys-file.sav': MRSET $a has only one variable.
2884 AT_SETUP([mixed variable types in mrsets])
2885 AT_KEYWORDS([sack synthetic system file negative multiple response])
2886 AT_DATA([sys-file.sack], [dnl
2888 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2889 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2892 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2893 2; 8; 0; 0; 0x010800 *2; s8 "STR1";
2895 dnl Multiple response sets.
2896 7; 7; 1; COUNT("$a=C 0 NUM1 STR1"; i8 10);
2901 "be 0f130e967e4097823f85b8711eb20727" \
2902 "le 4dc987b4303fd115f1cae9be3963acc9"
2905 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2907 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2909 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2910 warning: `sys-file.sav': MRSET $a contains both string and numeric variables.
2912 warning: `sys-file.sav': MRSET $a has only one variable.
2917 AT_SETUP([missing newline after variable name in mrsets])
2918 AT_KEYWORDS([sack synthetic system file negative multiple response])
2919 AT_DATA([sys-file.sack], [dnl
2921 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2922 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2924 dnl Numeric variable, no label or missing values.
2925 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2927 dnl Multiple response sets.
2928 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10);
2933 "be 3a891e0a467afb3d622629c70f329ada" \
2934 "le 432998ec08370510411af4f5207c015e"
2937 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2939 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2941 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2942 warning: `sys-file.sav': MRSET $a has only one variable.
2947 AT_SETUP([zero or one variable in mrset])
2948 AT_KEYWORDS([sack synthetic system file negative multiple response])
2949 AT_DATA([sys-file.sack], [dnl
2951 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2952 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2954 dnl Numeric variable, no label or missing values.
2955 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2957 dnl Multiple response sets.
2958 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10; "$b=C 0 "; i8 10);
2963 "be d94549fece75560fe5b47f32713b63a1" \
2964 "le 63028521d460df9e998b40a75a93c330"
2967 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2969 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2971 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2972 warning: `sys-file.sav': MRSET $a has only one variable.
2974 warning: `sys-file.sav': MRSET $b has no variables.
2979 AT_SETUP([wrong display parameter size])
2980 AT_KEYWORDS([sack synthetic system file negative])
2981 AT_DATA([sys-file.sack], [dnl
2983 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2984 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2986 dnl Numeric variable, no label or missing values.
2987 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2989 dnl Display parameters record.
2990 7; 11; >>8<<; 2; 1.0; 1.0;
2992 dnl End of dictionary.
2996 "be 7c0f1ae47ae11e37d435c4abaceca226" \
2997 "le c29d05a1f8f15ed2201f31f8b787aaa0"
3000 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3002 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3004 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3005 "warning: `sys-file.sav' near offset 0xd8: Record type 7, subtype 11 has bad size 8 (expected 4)."
3010 AT_SETUP([wrong display parameter count])
3011 AT_KEYWORDS([sack synthetic system file negative])
3012 AT_DATA([sys-file.sack], [dnl
3014 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3015 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3017 dnl Numeric variable, no label or missing values.
3018 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3020 dnl Display parameters record.
3021 7; 11; 4; >>4<<; 1; 1; 2; 2;
3023 dnl End of dictionary.
3027 "be 372b57e73c69b05047b60bf6c596e2a1" \
3028 "le 2a550d8c5ceae4de7ced77df66e49d0f"
3031 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3033 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3035 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3036 warning: `sys-file.sav' near offset 0xd8: Extension 11 has bad count 4 (for 1 variables).
3041 AT_SETUP([wrong display measurement level])
3042 AT_KEYWORDS([sack synthetic system file negative])
3043 AT_DATA([sys-file.sack], [dnl
3045 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3046 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3048 dnl Numeric variable, no label or missing values.
3049 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3051 dnl Display parameters record.
3052 7; 11; 4; 2; >>4<<; 0;
3054 dnl End of dictionary.
3058 "be d43e7616b03743339f37292dec6c2204" \
3059 "le 821533c29a070cefdd8f07f4e1741d2a"
3062 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3064 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3066 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3067 warning: `sys-file.sav' near offset 0xd8: Invalid variable display parameters for variable 0 (NUM1). Default parameters substituted.
3072 AT_SETUP([wrong display alignment])
3073 AT_KEYWORDS([sack synthetic system file negative])
3074 AT_DATA([sys-file.sack], [dnl
3076 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3077 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3079 dnl Numeric variable, no label or missing values.
3080 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3082 dnl Display parameters record.
3083 7; 11; 4; 2; 1; >>-1<<;
3085 dnl End of dictionary.
3089 "be c54bc48b5767e2ec3a9ef31df790cb7c" \
3090 "le a4d8b14af64221abe83adb417d110e10"
3093 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3095 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3097 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3098 warning: `sys-file.sav' near offset 0xd8: Invalid variable display parameters for variable 0 (NUM1). Default parameters substituted.
3103 AT_SETUP([bad variable name in variable/value pair])
3104 AT_KEYWORDS([sack synthetic system file negative])
3105 AT_DATA([sys-file.sack], [dnl
3107 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3108 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3110 dnl Numeric variables.
3111 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI";
3113 dnl Long variable names.
3114 7; 13; 1; COUNT (>>"xyzzy"<<);
3116 dnl Dictionary termination record.
3120 "be b67b6e3c1900e5a9cc691055008f0447" \
3121 "le 26cc52e601f830f9087a0ea2bd9527df"
3124 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3126 AT_DATA([sys-file.sps], [dnl
3127 GET FILE='sys-file.sav'.
3129 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3130 warning: `sys-file.sav' near offset 0xde: Dictionary record refers to unknown variable xyzzy.
3135 AT_SETUP([duplicate long variable name])
3136 AT_KEYWORDS([sack synthetic system file negative])
3137 AT_DATA([sys-file.sack], [dnl
3139 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3140 2; 4; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3142 dnl Numeric variables.
3143 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI";
3144 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_A";
3145 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_B";
3146 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_C";
3148 dnl Long variable names.
3150 "LONGVARI=_Invalid"; i8 9;
3151 "LONGVA_A=LongVariableName"; i8 9;
3152 "LONGVA_B=LONGVARIABLENAME"; i8 9;
3155 dnl Dictionary termination record.
3159 "be 9b4b4daa00084d984efb8f889bcb727c" \
3160 "le c1b1470d5cd615106e9ae507c9948d8e"
3163 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3165 AT_DATA([sys-file.sps], [dnl
3166 GET FILE='sys-file.sav'.
3168 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3169 warning: `sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name `_Invalid'.
3171 warning: `sys-file.sav' near offset 0x138: Duplicate long variable name `LONGVARIABLENAME'.
3176 AT_SETUP([bad very long string length])
3177 AT_KEYWORDS([sack synthetic system file negative])
3178 AT_DATA([sys-file.sack], [dnl
3180 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3181 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3183 dnl Numeric variable.
3184 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3186 dnl Very long string map.
3188 "NUM1=00000"; i8 0; i8 9;
3189 "NUM1=00255"; i8 0; i8 9;
3190 "NUM1=00256"; i8 0; i8 9;
3193 dnl Dictionary termination record.
3197 "be 1309d8d9fb24bcf08952dce9b0f39a94" \
3198 "le 94a39de88f8034001b3e467c4cc04d0f"
3201 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3203 AT_DATA([sys-file.sps], [dnl
3204 GET FILE='sys-file.sav'.
3206 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
3207 warning: `sys-file.sav' near offset 0xd8: NUM1 listed as string of invalid length 00000 in very long string record.
3209 "warning: `sys-file.sav' near offset 0xd8: NUM1 listed in very long string record with width 00255, which requires only one segment."
3211 error: `sys-file.sav' near offset 0xd8: Very long string NUM1 overflows dictionary.
3216 AT_SETUP([bad very long string segment width])
3217 AT_KEYWORDS([sack synthetic system file negative])
3218 AT_DATA([sys-file.sack], [dnl
3220 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3221 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3224 2; 255; 0; 0; 0x01ff00 *2; s8 "STR1";
3225 (2; -1; 0; 0; 0; 0; s8 "") * 31;
3226 2; >>9<<; 0; 0; 0x010900 *2; s8 "STR1_A";
3227 >>2; -1; 0; 0; 0; 0; s8 "";<<
3229 dnl Very long string map.
3231 "STR1=00256"; i8 0; i8 9;
3234 dnl Dictionary termination record.
3238 "be 1d09a44a46859e6eda28e053dd4b7a8b" \
3239 "le 63b9ac0b3953f3e0d5ee248ebe257794"
3242 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3244 AT_DATA([sys-file.sps], [dnl
3245 GET FILE='sys-file.sav'.
3247 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
3248 error: `sys-file.sav' near offset 0x4f8: Very long string with width 256 has segment 1 of width 9 (expected 4).
3253 AT_SETUP([too many value labels])
3254 dnl Skip the test if multiplying a small number by INT32_MAX would not
3255 dnl cause an overflow in size_t.
3256 AT_SKIP_IF([test $SIZEOF_SIZE_T -gt 4])
3257 AT_KEYWORDS([sack synthetic system file negative])
3258 AT_DATA([sys-file.sack], [dnl
3260 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3261 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3263 dnl Numeric variable.
3264 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3268 "be 975b2668dde395ddf619977958b37412" \
3269 "le 0c14aa278cfc2a4b801f91c14321f03b"
3272 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3274 AT_DATA([sys-file.sps], [dnl
3275 GET FILE='sys-file.sav'.
3277 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
3278 error: `sys-file.sav' near offset 0xd4: Invalid number of labels 2147483647.
3283 AT_SETUP([missing type 4 record])
3284 AT_KEYWORDS([sack synthetic system file negative])
3285 AT_DATA([sys-file.sack], [dnl
3287 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3288 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3290 dnl Numeric variable.
3291 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3293 dnl Value label with missing type 4 record.
3294 3; 1; 1.0; i8 3; s7 "one";
3296 dnl End of dictionary.
3300 "be 5e1286ac92e3f25ff98492bc5019d608" \
3301 "le b33c12f776bbcaa43aa3bfdd4799e0c0"
3304 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3306 AT_DATA([sys-file.sps], [dnl
3307 GET FILE='sys-file.sav'.
3309 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
3310 error: `sys-file.sav' near offset 0xe8: Variable index record (type 4) does not immediately follow value label record (type 3) as it should.
3315 AT_SETUP([value label with no associated variables])
3316 AT_KEYWORDS([sack synthetic system file negative])
3317 AT_DATA([sys-file.sack], [dnl
3319 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3320 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3322 dnl Numeric variable.
3323 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3325 dnl Value label with no variables.
3326 3; 1; 1.0; i8 3; s7 "one"; 4; >>0<<;
3329 "be b0dcec30a936cbcad21c4f3d6fe10fcf" \
3330 "le 3b9fdfce5c8c248048232fd6eac018e3"
3333 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3335 AT_DATA([sys-file.sps], [dnl
3336 GET FILE='sys-file.sav'.
3338 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
3339 error: `sys-file.sav' near offset 0xec: Number of variables associated with a value label (0) is not between 1 and the number of variables (1).
3344 AT_SETUP([type 4 record names long string variable])
3345 AT_KEYWORDS([sack synthetic system file negative])
3346 AT_DATA([sys-file.sack], [dnl
3348 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3349 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3351 dnl Long string variable.
3352 2; 9; 0; 0; 0x010900 *2; s8 "STR1";
3353 2; -1; 0; 0; 0; 0; s8 "";
3355 dnl Value label that names long string variable.
3356 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 1; >>1<<;
3358 dnl End of dictionary.
3362 "be 14053a4f09de4c7c4c55281534dd66f4" \
3363 "le 8a61cc994c659fd66307d2f0fd64ce20"
3366 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
3367 AT_DATA([sys-file.sps], [dnl
3368 GET FILE='sys-file.sav'.
3370 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
3371 error: `sys-file.sav' near offset 0xf4: Value labels may not be added to long string variables (e.g. STR1) using records types 3 and 4.
3376 AT_SETUP([variables for value label must all be same type])
3377 AT_KEYWORDS([sack synthetic system file negative])
3378 AT_DATA([sys-file.sack], [dnl
3380 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3381 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3384 2; 6; 0; 0; 0x010600 *2; s8 "STR1";
3385 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3387 dnl Value label that names numeric and string variables.
3388 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 2<<;
3390 dnl End of dictionary.
3394 "be 7577c456726a88f52bbef63a8b47bf1a" \
3395 "le 3ba5c6af9ad0ae5cc88f9f63e726e414"
3398 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
3399 AT_DATA([sys-file.sps], [dnl
3400 GET FILE='sys-file.sav'.
3402 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
3403 "error: `sys-file.sav' near offset 0xf4: Variables associated with value label are not all of identical type. Variable STR1 is string, but variable NUM1 is numeric."
3408 AT_SETUP([duplicate value labels type])
3409 AT_KEYWORDS([sack synthetic system file negative])
3410 AT_DATA([sys-file.sack], [dnl
3412 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3413 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3416 2; 6; 0; 0; 0x010600 *2; s8 "STR1";
3417 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3419 dnl Duplicate value labels.
3420 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 1<<;
3421 3; 1; 1.0; i8 3; s7 "one"; 4; 2; >>2; 2<<;
3423 dnl End of dictionary.
3427 "be ef0f5b2ebddb5a3bfcda16c93a2508f4" \
3428 "le c00e27abd9a6c06bf29a108d7220435a"
3431 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3433 AT_DATA([sys-file.sps], [dnl
3434 GET FILE='sys-file.sav'.
3436 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3437 warning: `sys-file.sav' near offset 0xf4: Duplicate value label for `xyzzy ' on STR1.
3439 warning: `sys-file.sav' near offset 0x11c: Duplicate value label for 1 on NUM1.
3444 AT_SETUP([missing attribute value])
3445 AT_KEYWORDS([sack synthetic system file negative])
3446 AT_DATA([sys-file.sack], [dnl
3448 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3449 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3452 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR";
3454 dnl Data file attributes record.
3459 dnl Variable attributes record.
3465 dnl Dictionary termination record.
3469 "be 0fc71f5e3cdb6b7f2dd73d011d4885c2" \
3470 "le e519b44715400156a2bfe648eb5cff34"
3473 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3475 AT_DATA([sys-file.sps], [dnl
3476 GET FILE='sys-file.sav'.
3478 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3479 warning: `sys-file.sav' near offset 0xde: Error parsing attribute value Attr1[[1]].
3481 warning: `sys-file.sav' near offset 0x101: Error parsing attribute value fred[[2]].
3486 AT_SETUP([unquoted attribute value])
3487 AT_KEYWORDS([sack synthetic system file negative])
3488 AT_DATA([sys-file.sack], [dnl
3490 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3491 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3494 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR";
3496 dnl Data file attributes record.
3498 "Attr1(value"; i8 10;
3502 dnl Variable attributes record.
3505 "fred(23"; i8 10; ")"
3508 dnl Dictionary termination record.
3512 "be 33dba37c2247e63c04bb74a7b472293d" \
3513 "le 041025a9d9d9e21a7fabd90ba7341934"
3516 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3518 AT_DATA([sys-file.sps], [dnl
3519 GET FILE='sys-file.sav'.
3521 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3522 warning: `sys-file.sav' near offset 0xe4: Attribute value Attr1[[1]] is not quoted: value.
3524 warning: `sys-file.sav' near offset 0x106: Attribute value fred[[1]] is not quoted: 23.
3529 AT_SETUP([bad variable name in long string value label])
3530 AT_KEYWORDS([sack synthetic system file negative])
3531 AT_DATA([sys-file.sack], [dnl
3533 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3534 2; 3; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3537 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3538 2; 14; 0; 0; 0x010e00 *2; s8 "STR14";
3539 2; -1; 0; 0; 0; 0; s8 "";
3542 dnl No variable named STR9.
3543 COUNT(>>"STR9"<<); 9;
3544 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'");
3546 dnl NUM1 is numeric.
3547 COUNT(>>"NUM1"<<); 0;
3548 1; COUNT("xyz"); COUNT("value label for 1.0");
3550 dnl Wrong width for STR14.
3551 COUNT("STR14"); >>9<<;
3552 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'");
3554 dnl Wrong width for value.
3556 1; COUNT(>>"RSTUVWXYZ"<<); COUNT("value label for `RSTUVWXYZ'");
3558 dnl Duplicate value label.
3559 COUNT("STR14"); 14; 2;
3560 COUNT("abcdefghijklmn"); COUNT("value label for `abcdefghijklmn'");
3561 >>COUNT("abcdefghijklmn"); COUNT("another value label for `abcdefghijklmn'")<<;
3564 dnl Dictionary termination record.
3568 "be cf2e883dadb00e2c6404c09ea0a4e388" \
3569 "le 89c340faf0a7e4a8c834f9687684c091"
3572 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3574 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3576 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3577 warning: `sys-file.sav' near offset 0x128: Ignoring long string value label record for unknown variable STR9.
3579 warning: `sys-file.sav' near offset 0x164: Ignoring long string value label record for numeric variable NUM1.
3581 warning: `sys-file.sav' near offset 0x193: Ignoring long string value label record for variable STR14 because the record's width (9) does not match the variable's width (14).
3583 "warning: `sys-file.sav' near offset 0x1d4: Ignoring long string value label 0 for variable str14, with width 14, that has bad value width 9."
3585 warning: `sys-file.sav' near offset 0x259: Duplicate value label for `abcdefghijklmn' on str14.
3590 AT_SETUP([fewer data records than indicated by file header])
3591 AT_KEYWORDS([sack synthetic system file negative])
3592 AT_DATA([sys-file.sack], [dnl
3594 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3595 2; 2; 0; 0; >>5<<; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3597 dnl Numeric variables.
3598 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3599 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
3607 dnl Missing record here.
3610 "be 6ee097c3934055d0c4564641636f4b5a" \
3611 "le ae03fe1b888091d6938b5a436d44ac60"
3614 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3616 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3619 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
3620 [error: Error reading case from file `sys-file.sav'.
3632 AT_SETUP([partial data record between variables])
3633 AT_KEYWORDS([sack synthetic system file negative])
3634 AT_DATA([sys-file.sack], [dnl
3636 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3637 2; 2; 0; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3639 dnl Numeric variables.
3640 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3641 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
3649 "be 4bcc085d7d8f0f09c6a4ba8064ffe61c" \
3650 "le 7387fc5edd2740aff92c30ca688d6d9b"
3653 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3655 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3658 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
3659 [error: `sys-file.sav' near offset 0x110: File ends in partial case.
3668 AT_SETUP([partial data record within long string])
3669 AT_KEYWORDS([sack synthetic system file negative])
3670 AT_DATA([sys-file.sack], [dnl
3672 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3673 2; 2; 0; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3675 dnl Numeric variables.
3676 2; 14; 0; 0; 0x010e00 *2; s8 "STR14";
3677 2; -1; 0; 0; 0; 0; s8 "";
3681 s14 "one data item";
3685 "be 4a9e84f9e679afb7bb71acd0bb7eab89" \
3686 "le 30752606f14ee2deec2854e8e6de4b3b"
3689 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3691 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3694 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
3695 [error: `sys-file.sav' near offset 0x10e: Unexpected end of file.
3704 AT_SETUP([partial compressed data record])
3705 AT_KEYWORDS([sack synthetic system file positive])
3706 AT_DATA([sys-file.sack], [dnl
3708 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3710 6; dnl Nominal case size
3713 -1; dnl Unspecified number of cases.
3715 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
3718 dnl Numeric variables.
3719 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3720 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
3722 dnl String variable.
3723 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
3724 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
3725 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
3726 2; -1; 0; 0; 0; 0; s8 "";
3728 dnl Dictionary termination record.
3731 dnl Compressed data.
3732 i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123";
3735 "be ef01b16e2e397d979a3a7d20725ebe6d" \
3736 "le 51f7a61e9bc68992469d16c55d6ecd88"
3739 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3741 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3744 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
3745 [error: `sys-file.sav' near offset 0x190: File ends in partial case.
3748 num1,num2,str4,str8,str15
3749 -99,0,,abcdefgh,0123 @&t@
3754 AT_SETUP([zcompressed data - bad zheader_ofs])
3755 AT_KEYWORDS([sack synthetic system file negative zlib])
3756 zcompressed_sack | sed 's/.*zheader_ofs.*/>>i64 0<<;/' > sys-file.sack
3758 "be 6d5c32f34fa1bed6f9b8f7045d104fdc" \
3759 "le 1f67fbda4f0021143e141fe8403c5a97"
3762 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3764 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3766 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x178: Wrong ZLIB data header offset 0 (expected 0x178).
3771 AT_SETUP([zcompressed data - bad ztrailer_ofs])
3772 AT_KEYWORDS([sack synthetic system file negative zlib])
3773 zcompressed_sack | sed 's/.*ztrailer_ofs.*/>>i64 0<<;/' > sys-file.sack
3775 "be e2c8dec0c62d3d798825ad5906370634" \
3776 "le c1cff4cdddeee80bf1580cbc26fa9fd5"
3779 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3781 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3783 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x178: Impossible ZLIB trailer offset 0x0.
3788 # ztrailer_len must be a multiple of 24 and at least 48,
3789 # so a value of 12 is impossible.
3790 AT_SETUP([zcompressed data - invalid ztrailer_len])
3791 AT_KEYWORDS([sack synthetic system file negative zlib])
3792 zcompressed_sack | sed 's/.*ztrailer_len.*/>>i64 12<<;/' > sys-file.sack
3794 "be 27f5203463bc4c7644382f24ae87f84c" \
3795 "le 0035fa6ee7690720429715150ede85f4"
3798 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3800 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3802 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x178: Invalid ZLIB trailer length 12.
3807 # ztrailer_ofs + ztrailer_len must be the file size.
3808 AT_SETUP([zcompressed data - wrong ztrailer_len])
3809 AT_KEYWORDS([sack synthetic system file negative zlib])
3810 zcompressed_sack | sed 's/.*ztrailer_len.*/>>i64 72<<;/' > sys-file.sack
3812 "be 2ba9ae97bc0a7f5dcfe36e2463b9d7cb" \
3813 "le d737ea0a53ca5c6f20be359027171d73"
3816 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3818 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3820 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x190: End of ZLIB trailer (0x231) is not file size (0x219).
3821 error: `sys-file.sav' near offset 0x201: 72-byte ZLIB trailer specifies 1 data blocks (expected 2).
3826 AT_SETUP([zcompressed data - wrong ztrailer_bias])
3827 AT_KEYWORDS([sack synthetic system file negative zlib])
3828 zcompressed_sack | sed 's/.*ztrailer_bias.*/>>i64 0<<;/' > sys-file.sack
3830 "be a5b56ab5e799a3626de2cdd7bd8d7a03" \
3831 "le d7cd584c6d5a95df10ba640eb3f1f24f"
3834 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3836 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3838 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x1f1: ZLIB trailer bias (0) differs from file header bias (100.00).
3843 AT_SETUP([zcompressed data - wrong ztrailer_zero])
3844 AT_KEYWORDS([sack synthetic system file negative zlib])
3845 zcompressed_sack | sed 's/.*ztrailer_zero.*/>>i64 100<<;/' > sys-file.sack
3847 "be 8d746abedb3e74cfdc22207f3455db92" \
3848 "le 79cea017365cab35d59c7a300cfa66c1"
3851 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3853 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3855 AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x1f9: ZLIB trailer "zero" field has nonzero value 100.
3860 AT_SETUP([zcompressed data - wrong block_size])
3861 AT_KEYWORDS([sack synthetic system file negative zlib])
3862 zcompressed_sack | sed 's/.*block_size.*/>>0x1000<<;/' > sys-file.sack
3864 "be 8d5a1caa56be8892d453faf1047005ca" \
3865 "le 7daa1bd57b192893b313a351202e179b"
3868 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3870 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3872 AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x1fd: ZLIB trailer specifies unexpected 4096-byte block size.
3877 AT_SETUP([zcompressed data - wrong n_blocks])
3878 AT_KEYWORDS([sack synthetic system file negative zlib])
3879 zcompressed_sack | sed 's/.*n_blocks.*/>>2<<;/' > sys-file.sack
3881 "be cd29596fd6bf4a2f651febe820a7955f" \
3882 "le 8fc1f718dfd2abac7c3442c1055d4cab"
3885 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3887 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3889 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x201: 48-byte ZLIB trailer specifies 2 data blocks (expected 1).
3894 AT_SETUP([zcompressed data - wrong uncompressed_ofs])
3895 AT_KEYWORDS([sack synthetic system file negative zlib])
3896 zcompressed_sack | sed 's/.*uncompressed_ofs.*/i64 >>0x177<<;/' > sys-file.sack
3898 "be 5546120fe6161dc6ed20aec48d8e74a4" \
3899 "le 86fafd625ed5ceaa1bff4fc7f500b6ab"
3902 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3904 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3906 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x201: ZLIB block descriptor 0 reported uncompressed data offset 0x177, when 0x178 was expected.
3911 AT_SETUP([zcompressed data - wrong compressed_ofs])
3912 AT_KEYWORDS([sack synthetic system file negative zlib])
3913 zcompressed_sack | sed 's/.*@%:@ compressed_ofs.*/i64 >>0x191<<;/' > sys-file.sack
3915 "be 652e28f8d3f8e4ce47ad18d0f30e7bb9" \
3916 "le ebf2c647f2d7c47858d4f5ed683526e6"
3919 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3921 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3923 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x201: ZLIB block descriptor 0 reported compressed data offset 0x191, when 0x190 was expected.
3928 AT_SETUP([zcompressed data - compressed sizes don't add up])
3929 AT_KEYWORDS([sack synthetic system file negative zlib])
3930 AT_DATA([sys-file.sack], [dnl
3932 "$FL3"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3934 6; dnl Nominal case size
3935 2; dnl zlib compressed
3937 -1; dnl Unspecified number of cases.
3939 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
3942 dnl Numeric variables.
3943 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3944 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
3946 dnl String variable.
3947 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
3948 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
3949 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
3950 2; -1; 0; 0; 0; 0; s8 "";
3952 dnl Dictionary termination record.
3955 dnl ZLIB data header.
3956 i64 0x178; # zheader_ofs
3957 i64 0x190; # ztrailer_ofs
3958 i64 72; # ztrailer_len
3960 dnl This is where the ZLIB data blocks would go, but we don't need any to
3961 dnl provoke this message so we omit them.
3963 dnl ZLIB data trailer fixed header:
3964 i64 -100; # ztrailer_bias
3965 i64 0; # ztrailer_zero
3966 0x3ff000; # block_size
3969 dnl ZLIB block descriptor 1:
3970 i64 0x178; # uncompressed_ofs
3971 i64 0x190; # compressed_ofs
3972 0x100000; # uncompressed_size
3973 0x12345; # compressed_size
3975 dnl ZLIB block descriptor 2:
3976 i64 0x100178; # uncompressed_ofs
3977 i64 0x12405; # compressed_ofs
3978 0x100000; # uncompressed_size
3979 0x12345; # compressed_size
3982 "be 72ebf57bffa340afe16ed79959faac09" \
3983 "le 80b34e98f6b181dcc2e8ca4ba13f768d"
3986 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3988 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3990 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x1a8: ZLIB block descriptor 0 reported block size 0x100000, when 0x3ff000 was expected.
3991 error: `sys-file.sav' near offset 0x1c0: ZLIB block descriptor 1 reported compressed data offset 0x12405, when 0x124d5 was expected.
3996 AT_SETUP([zcompressed data - uncompressed_size > block_size])
3997 AT_KEYWORDS([sack synthetic system file negative zlib])
3998 zcompressed_sack | sed 's/.*uncompressed_size.*/>>0x400000<<;/' > sys-file.sack
4000 "be 9bb74ef407fe0b79e43c388eedc28212" \
4001 "le 6f145fb5f820c513f50b6f81310cdad5"
4004 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
4006 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
4008 AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x201: ZLIB block descriptor 0 reported block size 0x400000, when at most 0x3ff000 was expected.
4013 AT_SETUP([zcompressed data - compression expands data too much])
4014 AT_KEYWORDS([sack synthetic system file negative zlib])
4015 zcompressed_sack | sed 's/.*uncompressed_size.*/>>50<<;/
4016 s/.*@%:@ compressed_size.*/>>100<<;/' > sys-file.sack
4018 "be e11cadde5f0855c965a1cb388dedc36e" \
4019 "le 37953e71462b6554c5644fec8b539164"
4022 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
4024 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
4026 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x201: ZLIB block descriptor 0 reports compressed size 100 and uncompressed size 50.
4031 AT_SETUP([zcompressed data - compressed sizes don't add up])
4032 AT_KEYWORDS([sack synthetic system file negative zlib])
4033 zcompressed_sack | sed 's/.*@%:@ compressed_size.*/>>88<<;/' > sys-file.sack
4035 "be 366eaf85be1f26fb6549e2f8ee393628" \
4036 "le a756e5125e6a908cb4990f66cc419bef"
4039 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
4041 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
4043 AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x219: ZLIB trailer is at offset 0x1e9 but 0x1e8 would be expected from block descriptors.