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 22; 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 2; 11; 0; 1; 0x010b00 *2; s8 "STR7"; "first8by";
72 2; -1; 0; 0; 0; 0; s8 "";
74 dnl Long string variable, value label.
75 2; 25; 1; 0; 0x011900 *2; s8 "STR8"; 14; "25-byte string"; i8 0 * 2;
76 ( 2; -1; 0; 0; 0; 0; s8 ""; ) * 2;
77 dnl Variable label fields on continuation records have been spotted in system
78 dnl files created by "SPSS Power Macintosh Release 6.1".
79 2; -1; 1; 0; 0; 0; s8 ""; 20; "dummy variable label";
81 dnl Machine integer info record.
82 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
84 dnl Machine floating-point info record.
85 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST;
87 dnl Character encoding record.
88 7; 20; 1; 12; "windows-1252";
90 dnl Dictionary termination record.
94 1.0; 2.0; 3.0; 4.0; 5.0; 6.0; 7.0; 8.0; 9.0; 10.0;
95 s8 "abcd"; s8 "efgh"; s8 "ijkl"; s8 "mnop"; s8 "qrst"; s8 "uvwx";
96 s16 "yzABCDEFGHI"; s32 "JKLMNOPQRSTUVWXYZ01234567";
99 "be 94338da4d8d44244d43f31e2ea4d0a6a" \
100 "le e3e7eefb984b81be5531b579293cb127"
103 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
105 AT_DATA([sys-file.sps], [dnl
106 GET FILE='sys-file.sav'.
111 AT_CHECK([pspp -o pspp.csv sys-file.sps])
112 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
113 File label: PSPP synthetic test file: ôõöø
115 Variable,Description,,Position
117 num2,Numeric variable 2's label (ùúû),,2
121 num4,Another numeric variable label,,4
125 ,Missing Values: 1; 2,,
127 ,Missing Values: 1; 2; 3,,
129 ,Missing Values: 1 THRU 3,,
131 ,Missing Values: 1 THRU 3; 5,,
133 ,Missing Values: 1 THRU HIGHEST; -5,,
134 numÀÈÌÑÒ,Format: F8.0,,10
135 ,Missing Values: LOWEST THRU 1; 5,,
137 str2,String variable 2's label,,12
140 ,"Missing Values: ""MISS""",,
141 str4,Another string variable label,,14
143 ,"Missing Values: ""OTHR""",,
145 ,"Missing Values: ""MISS""; ""OTHR""",,
147 ,"Missing Values: ""MISS""; ""OTHR""; ""MORE""",,
149 ,"Missing Values: ""first8by""",,
150 str8,25-byte string,,18
154 num1,num2,num3,num4,num5,num6,num7,num8,num9,numÀÈÌÑÒ,str1,str2,str3,str4,str5,str6,str7,str8
155 1,2,3,4,5,6,7,8,9,10,abcd,efgh,ijkl,mnop,qrst,uvwx,yzABCDEFGHI,JKLMNOPQRSTUVWXYZ01234567
160 AT_SETUP([unspecified number of variable positions])
161 AT_KEYWORDS([sack synthetic system file positive])
162 AT_DATA([sys-file.sack], [dnl
164 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
166 -1; dnl Nominal case size (unspecified)
167 0; dnl Not compressed
171 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
174 dnl Numeric variable, no label or missing values.
175 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
177 dnl Numeric variable, variable label.
178 2; 0; 1; 0; 0x050800 *2; s8 "NUM2";
179 26; "Numeric variable 2's label"; i8 0 *2;
181 dnl Dictionary termination record.
188 "be 413e7bc80a47fcd7e4c8020e8e120060" \
189 "le d7db9120b1ff28c83aa6fe9fc405d903"
192 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
194 AT_DATA([sys-file.sps], [dnl
195 GET FILE='sys-file.sav'.
199 AT_CHECK([pspp -o pspp.csv sys-file.sps])
200 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
201 Variable,Description,,Position
203 num2,Numeric variable 2's label,,2
213 AT_SETUP([wrong number of variable positions but version 13])
214 AT_KEYWORDS([sack synthetic system file positive])
215 AT_DATA([sys-file.sack], [dnl
217 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
219 -1; dnl Nominal case size (unspecified)
220 0; dnl Not compressed
224 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
227 dnl Numeric variable, no label or missing values.
228 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
230 dnl Numeric variable, variable label.
231 2; 0; 1; 0; 0x050800 *2; s8 "NUM2";
232 26; "Numeric variable 2's label"; i8 0 *2;
234 dnl Machine integer info record (SPSS 13).
235 7; 3; 4; 8; 13; 2; 3; -1; 1; 1; ENDIAN; 1252;
237 dnl Dictionary termination record.
244 "be 3d17aae7d99538dc73c5cb42692b1038" \
245 "le 8ad1000df598617d5258f323c882d749"
248 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
250 AT_DATA([sys-file.sps], [dnl
251 GET FILE='sys-file.sav'.
255 AT_CHECK([pspp -o pspp.csv sys-file.sps])
256 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
257 Variable,Description,,Position
259 num2,Numeric variable 2's label,,2
269 AT_SETUP([value labels])
270 AT_KEYWORDS([sack synthetic system file positive])
271 AT_DATA([sys-file.sack], [dnl
273 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
275 22; dnl Nominal case size
276 0; dnl Not compressed
280 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
283 dnl Numeric variables.
284 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
285 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
286 2; 0; 0; 0; 0x050800 *2; s8 "NUM3";
287 2; 0; 0; 0; 0x050800 *2; s8 "NUM4";
288 2; 0; 0; 0; 0x050800 *2; s8 "NUM5";
290 dnl String variables.
291 2; 1; 0; 0; 0x010100 *2; s8 "STR1"; dnl index 6
292 2; 2; 0; 0; 0x010200 *2; s8 "STR2"; dnl index 7
293 2; 3; 0; 0; 0x010300 *2; s8 "STR3"; dnl index 8
294 2; 4; 0; 0; 0x010400 *2; s8 "STR4"; dnl index 9
295 2; 4; 0; 0; 0x010400 *2; s8 "STR5"; dnl index 10
296 2; 6; 0; 0; 0x010600 *2; s8 "STR6"; dnl index 11
297 2; 7; 0; 0; 0x010700 *2; s8 "STR7"; dnl index 12
298 2; 8; 0; 0; 0x010800 *2; s8 "STR8"; dnl index 13
299 2; 9; 0; 0; 0x010900 *2; "STR9"; i8 230; s3 ""; dnl index 14
300 2; -1; 0; 0; 0; 0; s8 "";
301 2; 12; 0; 0; 0x010c00 *2; s8 "STR12"; dnl index 16
302 2; -1; 0; 0; 0; 0; s8 "";
303 2; 16; 0; 0; 0x011000 *2; s8 "STR16"; dnl index 18
304 2; -1; 0; 0; 0; 0; s8 "";
305 2; 17; 0; 0; 0x011100 *2; s8 "STR17"; dnl index 20
306 ( 2; -1; 0; 0; 0; 0; s8 ""; ) * 2;
308 dnl One value label for NUM1.
309 3; 1; 1.0; i8 17; i8 238; i8 228; i8 232; i8 237; s19 " (in Russian)"; 4; 1; 1;
311 dnl Two value labels for NUM2, as a single pair of type 3 and type 4 records.
312 3; 2; 1.0; i8 3; s7 "one"; 2.0; i8 3; s7 "two"; 4; 1; 2;
314 dnl Two value labels for NUM3, as two pairs of type 3 and type 4 records.
315 3; 1; 3.0; i8 5; s7 "three"; 4; 1; 3;
316 3; 1; 4.0; i8 4; s7 "four"; 4; 1; 3;
318 dnl Two common value labels for NUM4 and NUM5, plus two different ones for each.
319 3; 1; 5.0; i8 4; s7 "five"; 4; 1; 4;
320 3; 1; 6.0; i8 3; s7 "six"; 4; 1; 5;
321 3; 2; 7.0; i8 5; s7 "seven"; 8.0; i8 5; s7 "eight"; 4; 2; 4; 5;
322 3; 1; 9.0; i8 4; s7 "nine"; 4; 1; 4;
323 3; 1; 10.0; i8 3; s7 "ten"; 4; 1; 5;
325 dnl One value label for STR1.
326 3; 1; s8 "a"; i8 19; s23 "value label for `a'"; 4; 1; 6;
328 dnl Two value labels for STR2, as a single pair of type 3 and type 4 records.
330 s8 "bc"; i8 20; s23 "value label for `bc'";
331 s8 "de"; i8 20; s23 "value label for `de'";
334 dnl Two value labels for STR3, as two pairs of type 3 and type 4 records.
335 3; 1; s8 "fgh"; i8 21; s23 "value label for `fgh'"; 4; 1; 8;
336 3; 1; s8 "ijk"; i8 21; s23 "value label for `ijk'"; 4; 1; 8;
338 dnl Two common value labels for STR4 and STR5, plus two different ones for each.
339 3; 1; s8 "lmno"; i8 22; s23 "value label for `lmno'"; 4; 1; 9;
340 3; 1; s8 "pqrs"; i8 22; s23 "value label for `pqrs'"; 4; 1; 10;
342 s8 "tuvw"; i8 22; s23 "value label for `tuvw'";
343 s8 "xyzA"; i8 22; s23 "value label for `xyzA'";
345 3; 1; s8 "BCDE"; i8 22; s23 "value label for `BCDE'"; 4; 1; 9;
346 3; 1; s8 "FGHI"; i8 22; s23 "value label for `FGHI'"; 4; 1; 10;
348 dnl One value label for STR6, STR7, STR8.
349 3; 1; s8 "JKLMNO"; i8 24; s31 "value label for `JKLMNO'"; 4; 1; 11;
350 3; 1; s8 "JKLMNOP"; i8 25; s31 "value label for `JKLMNOP'"; 4; 1; 12;
351 3; 1; s8 "JKLMNOPQ"; i8 26; s31 "value label for `JKLMNOPQ'"; 4; 1; 13;
353 dnl Machine integer info record.
354 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1251;
356 dnl Character encoding record.
357 7; 20; 1; 12; "windows-1251";
360 dnl One value label for STR9ж,
361 COUNT("STR9"; i8 230); 9; 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'");
363 dnl Two value labels for STR12.
364 COUNT("STR12"); 12; 2;
365 COUNT("0123456789ab"); COUNT("value label for `0123456789ab'");
366 COUNT("cdefghijklmn"); COUNT("value label for `cdefghijklmn'");
368 dnl Three value labels for STR16.
369 COUNT("STR16"); 16; 3;
370 COUNT("opqrstuvwxyzABCD"); COUNT("value label for `opqrstuvwxyzABCD'");
371 COUNT("EFGHIJKLMNOPQRST"); COUNT("value label for `EFGHIJKLMNOPQRST'");
372 COUNT("UVWXYZ0123456789"); COUNT("value label for `UVWXYZ0123456789' with Cyrillic letters: `"; i8 244; i8 245; i8 246; "'");
374 dnl One value label for STR17.
375 COUNT("STR17"); 17; 1;
376 COUNT("abcdefghijklmnopq"); COUNT("value label for `abcdefghijklmnopq'");
379 dnl Dictionary termination record.
383 "be b27d766d8a5ad9e901c8b244591a5942" \
384 "le eb2e93f3cc29acd605b80e6c3af25ba6"
387 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
389 AT_DATA([sys-file.sps], [dnl
390 GET FILE='sys-file.sav'.
393 AT_CHECK([pspp -o pspp.csv sys-file.sps])
394 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
395 Variable,Description,,Position
397 ,1,один (in Russian),
415 ,a,value label for `a',
417 ,bc,value label for `bc',
418 ,de,value label for `de',
420 ,fgh,value label for `fgh',
421 ,ijk,value label for `ijk',
423 ,BCDE,value label for `BCDE',
424 ,lmno,value label for `lmno',
425 ,tuvw,value label for `tuvw',
426 ,xyzA,value label for `xyzA',
428 ,FGHI,value label for `FGHI',
429 ,pqrs,value label for `pqrs',
430 ,tuvw,value label for `tuvw',
431 ,xyzA,value label for `xyzA',
433 ,JKLMNO,value label for `JKLMNO',
435 ,JKLMNOP,value label for `JKLMNOP',
437 ,JKLMNOPQ,value label for `JKLMNOPQ',
439 ,RSTUVWXYZ,value label for `RSTUVWXYZ',
440 str12,Format: A12,,15
441 ,0123456789ab,value label for `0123456789ab',
442 ,cdefghijklmn,value label for `cdefghijklmn',
443 str16,Format: A16,,16
444 ,EFGHIJKLMNOPQRST,value label for `EFGHIJKLMNOPQRST',
445 ,UVWXYZ0123456789,value label for `UVWXYZ0123456789' with Cyrillic letters: `фхц',
446 ,opqrstuvwxyzABCD,value label for `opqrstuvwxyzABCD',
447 str17,Format: A17,,17
448 ,abcdefghijklmnopq,value label for `abcdefghijklmnopq',
453 AT_SETUP([documents])
454 AT_KEYWORDS([sack synthetic system file positive])
455 AT_DATA([sys-file.sack], [dnl
457 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
459 1; dnl Nominal case size
460 0; dnl Not compressed
464 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
467 dnl Numeric variable, no label or missing values.
468 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
470 dnl Machine integer info record.
471 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
475 s80 "First line of documents";
476 s80 "Second line of documents";
477 "abb"; i8 233; " appliqu"; i8 233; " attach"; i8 233; " blas"; i8 233; " caf"; i8 233; " canap"; i8 233; " clich"; i8 233; " consomm"; i8 233;
480 s80 "Last line of documents";
482 dnl Character encoding record.
483 7; 20; 1; 12; "windows-1252";
485 dnl Dictionary termination record.
492 "be 3555f74f3e714a3a703de7df56ce6d24" \
493 "le ede5a0f805a1aab096ea86abf677ff34"
496 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
498 AT_DATA([sys-file.sps], [dnl
499 GET FILE='sys-file.sav'.
503 AT_CHECK([pspp -o pspp.csv sys-file.sps])
504 AT_CHECK([cat pspp.csv], [0], [dnl
505 Documents in the active dataset:
507 First line of documents
509 Second line of documents
511 abbé appliqué attaché blasé café canapé cliché consommé
515 Last line of documents
524 AT_SETUP([multiple response sets])
525 AT_KEYWORDS([sack synthetic system file positive])
526 AT_DATA([sys-file.sack], [dnl
528 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
530 16; dnl Nominal case size
531 0; dnl Not compressed
535 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
539 2; 0; 0; 0; 0x050800 *2; i8 0x82; i8 0xa0; s6 "";
540 2; 0; 0; 0; 0x050800 *2; s8 "B";
541 2; 0; 0; 0; 0x050800 *2; s8 "C";
544 2; 0; 0; 0; 0x050800 *2; s8 "D";
545 2; 0; 0; 0; 0x050800 *2; s8 "E";
546 2; 0; 0; 0; 0x050800 *2; s8 "F";
547 2; 0; 0; 0; 0x050800 *2; s8 "G";
550 2; 4; 0; 0; 0x010400 *2; s8 "H";
551 2; 4; 0; 0; 0x010400 *2; s8 "I";
552 2; 4; 0; 0; 0x010400 *2; s8 "J";
555 2; 0; 0; 0; 0x050800 *2; s8 "K";
556 2; 0; 0; 0; 0x050800 *2; s8 "L";
557 2; 0; 0; 0; 0x050800 *2; s8 "M";
560 2; 6; 0; 0; 0x010600 *2; s8 "N";
561 2; 6; 0; 0; 0x010600 *2; s8 "O";
562 2; 6; 0; 0; 0x010600 *2; s8 "P";
564 dnl Machine integer info record.
565 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 932;
569 "$a=C 10 my mcgroup "; i8 0x82; i8 0xa0; " b c"; i8 10;
570 "$b=D2 55 0 g e f d"; i8 10;
571 "$c=D4 "; i8 0x82; i8 0xcd; i8 0x82; i8 0xa2; " 10 mdgroup #2 h i j"; i8 10);
575 "$d=E 1 2 34 13 third mdgroup k l m"; i8 10;
576 "$e=E 11 6 choice 0 n o p"; i8 10);
578 dnl Character encoding record.
579 7; 20; 1; 9; "shift_jis";
581 dnl Dictionary termination record.
585 "be fdf260a05220e08c748967dcb90d8b15" \
586 "le 4c9b0c0636bc0aa0cc16684c8188d1c7"
589 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
591 AT_DATA([sys-file.sps], [dnl
592 GET FILE='sys-file.sav'.
593 MRSETS /DISPLAY NAME=ALL.
595 AT_CHECK([pspp -o pspp.csv sys-file.sps])
596 AT_CHECK([cat pspp.csv], [0], [dnl
597 Table: Multiple Response Sets
598 Name,Variables,Details
602 ","Multiple category set
609 ","Multiple dichotomy set
611 Category label source: Variable labels
616 ","Multiple dichotomy set
618 Label source: Provided by user
620 Category label source: Variable labels
625 ","Multiple dichotomy set
627 Label source: Provided by user
629 Category label source: Value labels of counted value
634 ","Multiple dichotomy set
635 Label source: First variable label among variables
636 Counted value: `choice'
637 Category label source: Value labels of counted value
643 AT_SETUP([variable display parameters, without width])
644 AT_KEYWORDS([sack synthetic system file positive])
645 AT_DATA([sys-file.sack], [dnl
647 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
649 19; dnl Nominal case size
650 0; dnl Not compressed
654 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
657 dnl Numeric variables.
658 2; 0; 0; 0; 0x050800 *2; s8 "A";
659 2; 0; 0; 0; 0x050800 *2; s8 "B";
660 2; 0; 0; 0; 0x050800 *2; s8 "C";
661 2; 0; 0; 0; 0x050800 *2; s8 "D";
663 dnl Short string variables.
664 2; 3; 0; 0; 0x010300 *2; s8 "H";
665 2; 3; 0; 0; 0x010300 *2; s8 "I";
666 2; 3; 0; 0; 0x010300 *2; s8 "J";
667 2; 3; 0; 0; 0x010300 *2; s8 "K";
669 dnl Long string variables.
670 2; 9; 0; 0; 0x010900 *2; s8 "L";
671 2; -1; 0; 0; 0; 0; s8 "";
672 2; 10; 0; 0; 0x010a00 *2; s8 "M";
673 2; -1; 0; 0; 0; 0; s8 "";
674 2; 17; 0; 0; 0x011100 *2; s8 "N";
675 ( 2; -1; 0; 0; 0; 0; s8 "" ) * 2;
676 2; 25; 0; 0; 0x011900 *2; s8 "O";
677 ( 2; -1; 0; 0; 0; 0; s8 "" ) * 3;
679 dnl Variable display parameters
694 dnl Dictionary termination record.
698 "be c130d9345080579b8862b360924edbfa" \
699 "le 6fde96f5a7c7386bff6cca049cd84d6a"
702 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
704 AT_DATA([sys-file.sps], [dnl
705 GET FILE='sys-file.sav'.
708 AT_CHECK([pspp -o pspp.csv sys-file.sps])
709 AT_CHECK([cat pspp.csv], [0], [dnl
710 Variable,Description,,Position
713 ,Display Alignment: Left,,
717 ,Display Alignment: Left,,
721 ,Display Alignment: Left,,
725 ,Display Alignment: Right,,
729 ,Display Alignment: Right,,
733 ,Display Alignment: Right,,
737 ,Display Alignment: Center,,
741 ,Display Alignment: Center,,
745 ,Display Alignment: Center,,
749 ,Display Alignment: Left,,
753 ,Display Alignment: Right,,
757 ,Display Alignment: Center,,
763 AT_SETUP([variable display parameters, with width])
764 AT_KEYWORDS([sack synthetic system file positive])
765 AT_DATA([sys-file.sack], [dnl
767 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
769 19; dnl Nominal case size
770 0; dnl Not compressed
774 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
777 dnl Numeric variables.
778 2; 0; 0; 0; 0x050800 *2; s8 "A";
779 2; 0; 0; 0; 0x050800 *2; s8 "B";
780 2; 0; 0; 0; 0x050800 *2; s8 "C";
781 2; 0; 0; 0; 0x050800 *2; s8 "D";
783 dnl Short string variables.
784 2; 3; 0; 0; 0x010300 *2; s8 "H";
785 2; 3; 0; 0; 0x010300 *2; s8 "I";
786 2; 3; 0; 0; 0x010300 *2; s8 "J";
787 2; 3; 0; 0; 0x010300 *2; s8 "K";
789 dnl Long string variables.
790 2; 9; 0; 0; 0x010900 *2; s8 "L";
791 2; -1; 0; 0; 0; 0; s8 "";
792 2; 10; 0; 0; 0x010a00 *2; s8 "M";
793 2; -1; 0; 0; 0; 0; s8 "";
794 2; 17; 0; 0; 0x011100 *2; s8 "N";
795 ( 2; -1; 0; 0; 0; 0; s8 "" ) * 2;
796 2; 25; 0; 0; 0x011900 *2; s8 "O";
797 ( 2; -1; 0; 0; 0; 0; s8 "" ) * 3;
799 dnl Variable display parameters
814 dnl Dictionary termination record.
818 "be 3ace75689a0b7faa9360936bbfe26055" \
819 "le 6e93f35d19a9882eb53ffb1b067ef7cd"
822 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
824 AT_DATA([sys-file.sps], [dnl
825 GET FILE='sys-file.sav'.
828 AT_CHECK([pspp -o pspp.csv sys-file.sps])
829 AT_CHECK([cat pspp.csv], [0], [dnl
830 Variable,Description,,Position
833 ,Display Alignment: Left,,
837 ,Display Alignment: Left,,
841 ,Display Alignment: Left,,
845 ,Display Alignment: Right,,
849 ,Display Alignment: Right,,
853 ,Display Alignment: Right,,
857 ,Display Alignment: Center,,
861 ,Display Alignment: Center,,
865 ,Display Alignment: Center,,
869 ,Display Alignment: Left,,
873 ,Display Alignment: Right,,
877 ,Display Alignment: Center,,
883 AT_SETUP([long variable names])
884 AT_KEYWORDS([sack synthetic system file positive])
885 AT_DATA([sys-file.sack], [dnl
887 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
889 7; dnl Nominal case size
890 0; dnl Not compressed
894 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
897 dnl Numeric variables.
898 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI";
899 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_A";
900 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_B";
901 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_C";
902 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDINA";
903 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDI_A";
904 2; 0; 0; 0; 0x050800 *2; "CO"; i8 214; "RDI_B";
906 dnl Machine integer info record.
907 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
909 dnl Machine floating-point info record.
910 7; 4; 8; 3; SYSMIS; HIGHEST; LOWEST;
912 dnl Long variable names.
914 "LONGVARI=LongVariableName1"; i8 9;
915 "LONGVA_A=LongVariableName2"; i8 9;
916 "LONGVA_B=LongVariableName3"; i8 9;
917 "LONGVA_C=LongVariableName4"; i8 9;
918 "CO"; i8 214; "RDINA=Co"; i8 246; "rdinate_X"; i8 9;
919 "CO"; i8 214; "RDI_A=Co"; i8 246; "rdinate_Y"; i8 9;
920 "CO"; i8 214; "RDI_B=Co"; i8 246; "rdinate_Z";
923 dnl Character encoding record.
924 7; 20; 1; 12; "windows-1252";
926 dnl Dictionary termination record.
930 "be 8ea5a72f3ae6e732371e92a7719c3951" \
931 "le 02bcf02cf08b1e8fc80a858101ae22fc"
934 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
936 AT_DATA([sys-file.sps], [dnl
937 GET FILE='sys-file.sav'.
940 AT_CHECK([pspp -o pspp.csv sys-file.sps])
941 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
942 Variable,Description,,Position
943 LongVariableName1,Format: F8.0,,1
944 LongVariableName2,Format: F8.0,,2
945 LongVariableName3,Format: F8.0,,3
946 LongVariableName4,Format: F8.0,,4
947 Coördinate_X,Format: F8.0,,5
948 Coördinate_Y,Format: F8.0,,6
949 Coördinate_Z,Format: F8.0,,7
954 AT_SETUP([very long strings])
955 AT_KEYWORDS([sack synthetic system file positive])
956 AT_DATA([sys-file.sack], [dnl
958 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
960 109; dnl Nominal case size
961 0; dnl Not compressed
965 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
969 2; 255; 0; 0; 0x01FF00 *2; "S"; i8 201; s6 "Q256";
970 (2; -1; 0; 0; 0; 0; s8 "") * 31;
971 2; 4; 0; 0; 0x010400 *2; "S"; i8 201; "Q256_1";
974 2; 255; 0; 0; 0x01FF00 *2; s8 "STR600";
975 (2; -1; 0; 0; 0; 0; s8 "") * 31;
976 2; 255; 0; 0; 0x01FF00 *2; s8 "STR600_1";
977 (2; -1; 0; 0; 0; 0; s8 "") * 31;
978 2; 96; 0; 0; 0x016000 *2; s8 "STR600_2";
979 (2; -1; 0; 0; 0; 0; s8 "") * 11;
981 dnl Machine integer info record.
982 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
984 dnl Very long string record.
986 "S"; i8 201; "Q256=00256"; i8 0; i8 9;
987 "STR600=00600"; i8 0; i8 9;
990 dnl Character encoding record.
991 7; 20; 1; 12; "windows-1252";
993 dnl Dictionary termination record.
997 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#" * 4;
999 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#" * 9;
1000 "abcdefghijklmnopqrstuvwxyzABCDEF";
1003 "be 844a4704f669dfe292482e587d690133" \
1004 "le b76025f602bdff6a42c1e0795a8b62ff"
1007 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1009 AT_DATA([sys-file.sps], [dnl
1010 GET FILE='sys-file.sav'.
1014 AT_CHECK([pspp -o pspp.csv sys-file.sps])
1015 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1016 Variable,Description,,Position
1017 sÉq256,Format: A256,,1
1018 str600,Format: A600,,2
1022 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@a,abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#abcdefghijklmnopqrstuvwxyz
1027 AT_SETUP([data file and variable attributes])
1028 AT_KEYWORDS([sack synthetic system file positive])
1029 AT_DATA([sys-file.sack], [dnl
1031 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1033 2; dnl Nominal case size
1034 0; dnl Not compressed
1038 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1042 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR";
1043 2; 0; 0; 0; 0x050800 *2; s8 "SECONDVA";
1045 dnl Machine integer info record.
1046 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; ENDIAN; 1252;
1048 dnl Long variable names.
1050 "FIRSTVAR=FirstVariable"; i8 9;
1051 "SECONDVA=S"; i8 233; "condVariable"; i8 9;
1054 dnl Data file attributes record.
1056 "Attr1('Value1'"; i8 10; "''d"; i8 233; "claration''"; i8 10; ")";
1057 "S"; i8 233; "condAttr('123'"; i8 10; "'456'"; i8 10; ")";
1060 dnl Variable attributes record.
1063 "ad"; i8 232; "le('23'"; i8 10; "'34'"; i8 10; ")";
1064 "bert('123'"; i8 10; ")";
1065 "/S"; i8 233; "condVariable:";
1066 "xyzzy('quux'"; i8 10; ")";
1070 dnl Character encoding record.
1071 7; 20; 1; 12; "windows-1252";
1073 dnl Dictionary termination record.
1077 "be c7cae57af35662acec3b945abcf7927c" \
1078 "le eb6b4ab9c27bfa0daa49bf2770bccb70"
1081 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1083 AT_DATA([sys-file.sps], [dnl
1084 GET FILE='sys-file.sav'.
1087 AT_CHECK([pspp -o pspp.csv sys-file.sps])
1088 AT_CHECK([cat pspp.csv], [0],
1089 [[Variable,Description,
1090 FirstVariable,Custom attributes:,
1094 SécondVariable,Custom attributes:,
1097 Table: Custom data file attributes.
1100 Attr1[2],'déclaration'
1107 AT_SETUP([compressed data])
1108 AT_KEYWORDS([sack synthetic system file positive])
1109 AT_DATA([sys-file.sack], [dnl
1111 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1113 6; dnl Nominal case size
1114 1; dnl Not compressed
1116 -1; dnl Unspecified number of cases.
1118 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1121 dnl Numeric variables.
1122 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1123 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
1125 dnl String variable.
1126 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
1127 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
1128 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
1129 2; -1; 0; 0; 0; 0; s8 "";
1131 dnl Dictionary termination record.
1134 dnl Compressed data.
1135 i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123";
1136 i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu";
1137 s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO";
1138 i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW";
1142 "be c0670e436b068f45710b98f6f7d01dc5" \
1143 "le 2e43a7f8861df4e714a192dfb3c8b2f4"
1146 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1148 AT_DATA([sys-file.sps], [dnl
1149 GET FILE='sys-file.sav'.
1153 AT_CHECK([pspp -o pspp.csv sys-file.sps])
1154 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1155 Variable,Description,,Position
1156 num1,Format: F8.0,,1
1157 num2,Format: F8.0,,2
1160 str15,Format: A15,,5
1163 num1,num2,str4,str8,str15
1164 -99,0,,abcdefgh,0123 @&t@
1165 .,151,jklm,nopqrstu,vwxyzABC @&t@
1166 1,2,DEFG,HIJKLMNO,PQRSTUV
1171 AT_SETUP([compressed data, zero bias])
1172 AT_KEYWORDS([sack synthetic system file positive])
1173 AT_DATA([sys-file.sack], [dnl
1175 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1177 6; dnl Nominal case size
1178 1; dnl Not compressed
1180 -1; dnl Unspecified number of cases.
1182 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1185 dnl Numeric variables.
1186 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1187 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
1189 dnl String variable.
1190 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
1191 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
1192 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
1193 2; -1; 0; 0; 0; 0; s8 "";
1195 dnl Dictionary termination record.
1198 dnl Compressed data.
1199 i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123";
1200 i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu";
1201 s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO";
1202 i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW";
1206 "be 2f0d25704ee497ae833213a3e4ff5e8b" \
1207 "le 49f68a9e1ba02a2f7e9166686a0db9d9"
1210 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1212 AT_DATA([sys-file.sps], [dnl
1213 GET FILE='sys-file.sav'.
1217 AT_CHECK([pspp -o pspp.csv sys-file.sps], [0])
1218 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1219 Variable,Description,,Position
1220 num1,Format: F8.0,,1
1221 num2,Format: F8.0,,2
1224 str15,Format: A15,,5
1227 num1,num2,str4,str8,str15
1228 1,100,,abcdefgh,0123 @&t@
1229 .,251,jklm,nopqrstu,vwxyzABC @&t@
1230 101,102,DEFG,HIJKLMNO,PQRSTUV
1235 AT_SETUP([compressed data, other bias])
1236 AT_KEYWORDS([sack synthetic system file positive])
1237 AT_DATA([sys-file.sack], [dnl
1239 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1241 6; dnl Nominal case size
1242 1; dnl Not compressed
1244 -1; dnl Unspecified number of cases.
1246 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
1249 dnl Numeric variables.
1250 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1251 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
1253 dnl String variable.
1254 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
1255 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
1256 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
1257 2; -1; 0; 0; 0; 0; s8 "";
1259 dnl Dictionary termination record.
1262 dnl Compressed data.
1263 i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123";
1264 i8 253 253 253 254; i8 101 102 253 253; s8 "jklm"; s8 "nopqrstu";
1265 s8 "vwxyzABC"; s8 "DEFG"; s8 "HIJKLMNO";
1266 i8 254 253 252 0 0 0 0 0; s8 "PQRSTUVW";
1270 "be 668b85e3dee0797883e9933a096b8c18" \
1271 "le 5e7a9c4e88cd2dbc2322943da663868e"
1274 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1276 AT_DATA([sys-file.sps], [dnl
1277 GET FILE='sys-file.sav'.
1281 AT_CHECK([pspp -o pspp.csv sys-file.sps], [0],
1282 [warning: `sys-file.sav' near offset 0x54: Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format.
1284 AT_CHECK([grep -v Measure pspp.csv | grep -v Display], [0], [dnl
1285 "warning: `sys-file.sav' near offset 0x54: Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format."
1287 Variable,Description,,Position
1288 num1,Format: F8.0,,1
1289 num2,Format: F8.0,,2
1292 str15,Format: A15,,5
1295 num1,num2,str4,str8,str15
1296 -49,50,,abcdefgh,0123 @&t@
1297 .,201,jklm,nopqrstu,vwxyzABC @&t@
1298 51,52,DEFG,HIJKLMNO,PQRSTUV
1303 AT_BANNER([system file reader - negative])
1305 AT_SETUP([misplaced type 4 record])
1306 AT_KEYWORDS([sack synthetic system file negative])
1307 AT_DATA([sys-file.sack], [dnl
1309 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1310 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1312 dnl Numeric variable.
1313 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1319 "be 6e0bb549fff1fd1af333d51b8a6e0f43" \
1320 "le 7b62734edcee2a1689c463f2866d11b8"
1323 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1325 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1327 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1328 [error: `sys-file.sav' near offset 0xd4: Misplaced type 4 record.
1333 AT_SETUP([bad record type])
1334 AT_KEYWORDS([sack synthetic system file negative])
1335 AT_DATA([sys-file.sack], [dnl
1337 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1338 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1340 dnl Numeric variable.
1341 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1343 dnl Type 8 record (not a valid type).
1347 "be dc8f078c23046ee7db74ec1003178a11" \
1348 "le dc7f111642f0629f4370630fd092eee3"
1351 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1353 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1355 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1356 [error: `sys-file.sav' near offset 0xd4: Unrecognized record type 8.
1361 AT_SETUP([wrong number of variable positions])
1362 AT_KEYWORDS([sack synthetic system file negative])
1363 AT_DATA([sys-file.sack], [dnl
1365 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1366 2; >>2<<; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1368 dnl Numeric variable.
1369 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1371 dnl End of dictionary.
1375 "be c57e91aa426f61813c3ad91ea3a56dda" \
1376 "le 5d1a6c114b135b219473c8ad5bb44bda"
1379 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1381 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1383 AT_CHECK([pspp -O format=csv sys-file.sps], [0],
1384 [warning: `sys-file.sav': File header claims 2 variable positions but 1 were read from file.
1389 AT_SETUP([variable name may not begin with `#'])
1390 AT_KEYWORDS([sack synthetic system file negative])
1391 AT_DATA([sys-file.sack], [dnl
1393 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1394 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1396 dnl Numeric variable.
1397 2; 0; 0; 0; 0x050800 *2; s8 >>"$UM1"<<;
1399 dnl End of dictionary.
1403 "be decb7ac6defa1ab3cc7a386d1843c1ae" \
1404 "le 5279b6275633bac55d167faebccfdb14"
1407 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1409 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1411 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1412 [error: `sys-file.sav' near offset 0xb4: Invalid variable name `$UM1'.
1417 AT_SETUP([variable name may not be reserved word])
1418 AT_KEYWORDS([sack synthetic system file negative])
1419 AT_DATA([sys-file.sack], [dnl
1421 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1422 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1424 dnl Numeric variable.
1425 2; 0; 0; 0; 0x050800 *2; s8 >>"TO"<<;
1427 dnl End of dictionary.
1431 "be 57e6ad709668bbf538e2efee4af49916" \
1432 "le 523f14b611efa380bbadf7a16ea43fed"
1435 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1437 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1439 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1440 [error: `sys-file.sav' near offset 0xb4: Invalid variable name `TO'.
1445 AT_SETUP([variable width must be between 0 and 255])
1446 AT_KEYWORDS([sack synthetic system file negative])
1447 AT_DATA([sys-file.sack], [dnl
1449 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1450 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1452 dnl String variable with invalid width 256.
1453 2; 256; 0; 0; 0x050800 *2; s8 "VAR1";
1455 dnl End of dictionary.
1459 "be 170bb18589ba264a0ed2d57b41fe77e1" \
1460 "le 9528b4b5936ef5630bbd3bdd60a123c3"
1463 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1465 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1467 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1468 [error: `sys-file.sav' near offset 0xb4: Bad width 256 for variable VAR1.
1473 AT_SETUP([duplicate variable name])
1474 AT_KEYWORDS([sack synthetic system file negative])
1475 AT_DATA([sys-file.sack], [dnl
1477 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1478 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1480 dnl Numeric variables.
1481 2; 0; 0; 0; 0x050800 *2; s8 "VAR1";
1482 2; 0; 0; 0; 0x050800 *2; s8 "VAR1";
1484 dnl End of dictionary.
1488 "be d8f5fd768ab1d641f9330a4840c71343" \
1489 "le f01e123d384cdaa7c2f7fc4791325ebf"
1492 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1494 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1496 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1497 [error: `sys-file.sav' near offset 0xd4: Duplicate variable name `VAR1'.
1502 AT_SETUP([variable label indicator not 0 or 1])
1503 AT_KEYWORDS([sack synthetic system file negative])
1504 AT_DATA([sys-file.sack], [dnl
1506 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1507 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1509 dnl Numeric variable.
1510 2; 0; >>2<<; 0; 0x050800 *2; s8 "VAR1";
1512 dnl End of dictionary.
1516 "be 3c5ff8d8f146457a385ca92d3d23ca8a" \
1517 "le 37e9f956d321ae57b0bf7fe2384e892b"
1520 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1522 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1524 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1525 [error: `sys-file.sav' near offset 0xb4: Variable label indicator field is not 0 or 1.
1530 AT_SETUP([invalid numeric missing value indicator])
1531 AT_KEYWORDS([sack synthetic system file negative])
1532 AT_DATA([sys-file.sack], [dnl
1534 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1535 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1537 dnl Numeric variable.
1538 2; 0; 0; >>-1<<; 0x050800 *2; s8 "VAR1";
1540 dnl End of dictionary.
1544 "be d1d0d4aedf9f053452c4b1e658ade5e2" \
1545 "le df697575499fe12921185a3d23a5d61d"
1548 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1550 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1552 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1553 ["error: `sys-file.sav' near offset 0xb4: Numeric missing value indicator field is not -3, -2, 0, 1, 2, or 3."
1558 AT_SETUP([invalid string missing value indicator])
1559 AT_KEYWORDS([sack synthetic system file negative])
1560 AT_DATA([sys-file.sack], [dnl
1562 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1563 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1565 dnl String variable.
1566 2; 8; 0; >>4<<; 0x010800 *2; s8 "VAR1";
1568 dnl End of dictionary.
1572 "be f833033be7b102fae19159989f62faa6" \
1573 "le 9704ba828bb7a36ef0262838f6b7936b"
1576 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1578 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1580 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1581 ["error: `sys-file.sav' near offset 0xb4: String missing value indicator field is not 0, 1, 2, or 3."
1586 AT_SETUP([missing string continuation record])
1587 AT_KEYWORDS([sack synthetic system file negative])
1588 AT_DATA([sys-file.sack], [dnl
1590 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1591 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1593 dnl String variable.
1594 2; 10; 0; 0; 0x010a00 *2; s8 "VAR1";
1595 >>2; 0; 0; 0; 0x050800 *2; s8 "VAR2";<<
1597 dnl End of dictionary.
1601 "be c8f9ad2b2acd2918055e2b78c1e0b4b8" \
1602 "le 1afab4d6aee90a6fe8d2dbf229e06409"
1605 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1607 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1609 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1610 [error: `sys-file.sav' near offset 0xb4: Missing string continuation record.
1615 AT_SETUP([invalid variable format])
1616 AT_KEYWORDS([sack synthetic system file negative])
1617 AT_DATA([sys-file.sack], [dnl
1619 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1620 2; 4; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1622 dnl Numeric variable, invalid format types.
1623 dnl No warning is issued for type 0 because it has been observed in real
1625 2; 0; 0; 0; >>0xff0800; 0<<; s8 "NUM1";
1627 dnl Numeric variable, string formats.
1628 2; 0; 0; 0; >>0x010800<<; >>0x021000<<; s8 "VAR1";
1630 dnl String variable, numeric formats.
1631 2; 4; 0; 0; >>0x050800<<; >>0x110a01<<; s8 "STR1";
1633 dnl String variable, wrong width formats.
1634 2; 4; 0; 0; >>0x010800<<; >>0x020400<<; s8 "STR2";
1636 dnl End of dictionary.
1640 "be c6ef5d8fded46443aba89adfafe15cad" \
1641 "le fccaf1764c973892f2d5adbcc2c36fb7"
1644 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1646 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1648 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
1649 warning: `sys-file.sav' near offset 0xc0: Variable NUM1 with width 0 has invalid print format 0xff0800.
1651 warning: `sys-file.sav' near offset 0xe0: Variable VAR1 with width 0 has invalid print format 0x10800.
1653 warning: `sys-file.sav' near offset 0xe4: Variable VAR1 with width 0 has invalid write format 0x21000.
1655 warning: `sys-file.sav' near offset 0x100: Variable STR1 with width 4 has invalid print format 0x50800.
1657 warning: `sys-file.sav' near offset 0x104: Variable STR1 with width 4 has invalid write format 0x110a01.
1659 warning: `sys-file.sav' near offset 0x120: Variable STR2 with width 4 has invalid print format 0x10800.
1661 warning: `sys-file.sav' near offset 0x124: Variable STR2 with width 4 has invalid write format 0x20400.
1666 AT_SETUP([weighting variable must be numeric])
1667 AT_KEYWORDS([sack synthetic system file negative])
1668 AT_DATA([sys-file.sack], [dnl
1670 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1671 2; 2; 1; >>2<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1673 dnl Numeric variable.
1674 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1676 dnl String variable.
1677 2; 4; 0; 0; 0x010400 *2; s8 "STR1";
1679 dnl End of dictionary.
1683 "be 82d30105e46c4896c24f9dcec26c4749" \
1684 "le 32e235119be70050eb78bf4186a5a046"
1687 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1689 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1691 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1692 [error: `sys-file.sav': Weighting variable must be numeric (not string variable `STR1').
1697 AT_SETUP([bad weighting variable index])
1698 AT_KEYWORDS([sack synthetic system file negative])
1699 AT_DATA([sys-file.sack], [dnl
1701 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1702 2; 2; 1; >>3<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1704 dnl Numeric variable.
1705 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1707 dnl String variable.
1708 2; 4; 0; 0; 0x010400 *2; s8 "STR1";
1710 dnl End of dictionary.
1714 "be cd9af924ff20bc75834aa2c696254c97" \
1715 "le cbe0f2f514f5e95f27644d0b4314bc78"
1718 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1720 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1722 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1723 [error: `sys-file.sav' near offset 0x4c: Variable index 3 not in valid range 1...2.
1728 AT_SETUP([variable index is long string contination])
1729 AT_KEYWORDS([sack synthetic system file negative])
1730 AT_DATA([sys-file.sack], [dnl
1732 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1733 2; 2; 1; >>3<<; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1735 dnl Numeric variable.
1736 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1738 dnl Long string variable.
1739 2; 9; 0; 0; 0x010900 *2; s8 "STR1";
1740 (2; -1; 0; 0; 0; 0; s8 "");
1742 dnl End of dictionary.
1746 "be 0c395354df56ea5ff374aafcc535d633" \
1747 "le d977f684ea9d4648ed40f8c6dddde9f7"
1750 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1752 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1754 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
1755 [error: `sys-file.sav' near offset 0x4c: Variable index 3 refers to long string continuation.
1760 AT_SETUP([multiple documents records])
1761 AT_KEYWORDS([sack synthetic system file negative])
1762 AT_DATA([sys-file.sack], [dnl
1764 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1765 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1767 dnl Numeric variable, no label or missing values.
1768 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1770 dnl Two document records.
1771 (6; 1; s80 "One line of documents") >>* 2<<;
1773 dnl Dictionary termination record.
1780 "be 18aa3348a216ed494efe28285b348fa8" \
1781 "le 19b21522bcef1dcc60af328f923f307e"
1784 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1786 AT_DATA([sys-file.sps], [dnl
1787 GET FILE='sys-file.sav'.
1789 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
1790 error: `sys-file.sav' near offset 0x12c: Duplicate type 6 (document) record.
1796 AT_SETUP([empty document record])
1797 AT_KEYWORDS([sack synthetic system file negative])
1798 AT_DATA([sys-file.sack], [dnl
1800 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1801 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1803 dnl Numeric variable, no label or missing values.
1804 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1806 dnl Empty document record.
1809 dnl Dictionary termination record.
1816 "be d8ef29c1b97f9ed226cbd938c9c49b6e" \
1817 "le f6a560c5b62e2c472429d85294f36e61"
1820 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1822 AT_DATA([sys-file.sps], [dnl
1823 GET FILE='sys-file.sav'.
1825 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
1826 error: `sys-file.sav' near offset 0xd4: Number of document lines (0) must be greater than 0 and less than 26843545.
1831 AT_SETUP([extension record too large])
1832 AT_KEYWORDS([sack synthetic system file negative])
1833 AT_DATA([sys-file.sack], [dnl
1835 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1836 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1838 dnl Numeric variable, no label or missing values.
1839 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1841 dnl Too-large extension record.
1842 7; 3; >>0xfffff000 * 2<<;
1845 "be 5a6679dc41ac349b0b73fc430937c05c" \
1846 "le d4769c7f650cfbf160e0386d0d33be04"
1849 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1851 AT_DATA([sys-file.sps], [dnl
1852 GET FILE='sys-file.sav'.
1854 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
1855 error: `sys-file.sav' near offset 0xd8: Record type 7 subtype 3 too large.
1860 AT_SETUP([unknown extension record])
1861 AT_KEYWORDS([sack synthetic system file negative])
1862 AT_DATA([sys-file.sack], [dnl
1864 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1865 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1867 dnl Numeric variable, no label or missing values.
1868 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1870 dnl Unknown extension record type.
1873 dnl End of dictionary.
1877 "be ac8395e27677408189bcb8655e56cc0e" \
1878 "le e308bfcd51f1e3c28d7379c29271f9d6"
1881 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1883 AT_DATA([sys-file.sps], [dnl
1884 GET FILE='sys-file.sav'.
1886 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
1887 "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."
1892 AT_SETUP([bad machine integer info size])
1893 AT_KEYWORDS([sack synthetic system file negative])
1894 AT_DATA([sys-file.sack], [dnl
1896 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1897 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1899 dnl Numeric variable, no label or missing values.
1900 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1902 dnl Machine integer info record.
1903 7; 3; 4; >>9<<; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; >>1234<<;
1905 dnl End of dictionary.
1909 "be 21ec84826886b0a266d1360f8279d769" \
1910 "le 15dcba7b2b89b7d8a21ebcc872f515af"
1913 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
1914 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1916 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
1917 "warning: `sys-file.sav' near offset 0xd8: Record type 7, subtype 3 has bad count 9 (expected 8)."
1922 AT_SETUP([bad machine integer info float format])
1923 AT_KEYWORDS([sack synthetic system file negative])
1924 AT_DATA([sys-file.sack], [dnl
1926 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1927 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1929 dnl Numeric variable, no label or missing values.
1930 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1932 dnl Machine integer info record.
1933 7; 3; 4; 8; 1; 2; 3; -1; >>2<<; 1; ENDIAN; 1252;
1935 dnl End of dictionary.
1939 "be d510ed28278649eee997fb6881a4c04f" \
1940 "le fbf1eca561a4e243b7ae844ed1677035"
1943 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
1944 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
1946 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
1947 error: `sys-file.sav' near offset 0xd8: Floating-point representation indicated by system file (2) differs from expected (1).
1952 AT_SETUP([bad machine integer info endianness])
1953 AT_KEYWORDS([sack synthetic system file negative])
1954 AT_DATA([sys-file.sack], [dnl
1956 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1957 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1959 dnl Numeric variable, no label or missing values.
1960 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
1962 dnl Machine integer info record.
1963 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; >>3<<; 1252;
1965 dnl End of dictionary.
1969 "be 855123d16d5e1560b91d60753dad79ad 1" \
1970 "le d6626b4fa2e46a91f26c2fc609b2f1e0 2"
1973 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
1975 AT_DATA([sys-file.sps], [dnl
1976 GET FILE='sys-file.sav'.
1979 AT_CHECK_UNQUOTED([pspp -O format=csv sys-file.sps], [0], [dnl
1980 warning: \`sys-file.sav' near offset 0xd8: Integer format indicated by system file (3) differs from expected ($[3]).
1982 Variable,Description,,Position
1983 num1,Format: F8.0,,1
1985 ,Display Alignment: Right,,
1992 AT_SETUP([bad machine floating-point info size])
1993 AT_KEYWORDS([sack synthetic system file negative])
1994 AT_DATA([sys-file.sack], [dnl
1996 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
1997 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
1999 dnl Numeric variable, no label or missing values.
2000 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2002 dnl Machine floating-point info record.
2003 7; 4; 8; >>4<<; SYSMIS; HIGHEST; LOWEST; 0.0;
2005 dnl End of dictionary.
2009 "be 29c9a173638fbb8bb1efe1176c4d670f" \
2010 "le 5cb49eb1084e5b9cd573a54705ff86a7"
2013 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
2014 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2016 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2017 "warning: `sys-file.sav' near offset 0xd8: Record type 7, subtype 4 has bad count 4 (expected 3)."
2022 AT_SETUP([wrong special floating point values])
2023 AT_KEYWORDS([sack synthetic system file negative])
2024 AT_DATA([sys-file.sack], [dnl
2026 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2027 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2029 dnl Numeric variable, no label or missing values.
2030 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2032 dnl Machine floating-point info record.
2033 7; 4; 8; 3; >>0.0<<; >>1.0<<; >>2.0<<;
2035 dnl End of dictionary.
2039 "be 1e7452d9bb0a2397bf6084a25437514e" \
2040 "le f59f9a83f723cde1611869ff6d91d325"
2043 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2045 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2047 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2048 warning: `sys-file.sav' near offset 0xd8: File specifies unexpected value 0 as SYSMIS.
2050 warning: `sys-file.sav' near offset 0xd8: File specifies unexpected value 1 as HIGHEST.
2052 warning: `sys-file.sav' near offset 0xd8: File specifies unexpected value 2 as LOWEST.
2057 AT_SETUP([bad mrsets name])
2058 AT_KEYWORDS([sack synthetic system file negative multiple response])
2059 AT_DATA([sys-file.sack], [dnl
2061 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2062 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2064 dnl Numeric variable, no label or missing values.
2065 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2067 dnl Multiple response sets.
2068 7; 7; 1; COUNT("a=C");
2069 7; 19; 1; COUNT("xyz=D");
2074 "be 15a9bf44d0cd6186a60629b77079c5a5" \
2075 "le 161c99aca5e7a3684df096137e72ce5b"
2078 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2080 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2082 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2083 warning: `sys-file.sav' near offset 0xd8: `a' does not begin with `$' at offset 2 in MRSETS record.
2085 warning: `sys-file.sav' near offset 0xeb: `xyz' does not begin with `$' at offset 4 in MRSETS record.
2090 AT_SETUP([missing space after C in mrsets])
2091 AT_KEYWORDS([sack synthetic system file negative multiple response])
2092 AT_DATA([sys-file.sack], [dnl
2094 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2095 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2097 dnl Numeric variable, no label or missing values.
2098 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2100 dnl Multiple response sets.
2101 7; 7; 1; COUNT("$a=Cx");
2106 "be c5e5656ba3d74c3a967850f29ad89970" \
2107 "le 29f110509c3d6893a7d21ae2d66aad9d"
2110 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2112 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2114 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2115 warning: `sys-file.sav' near offset 0xd8: Missing space following `C' at offset 4 in MRSETS record.
2120 AT_SETUP([missing space after E in mrsets])
2121 AT_KEYWORDS([sack synthetic system file negative multiple response])
2122 AT_DATA([sys-file.sack], [dnl
2124 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2125 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2127 dnl Numeric variable, no label or missing values.
2128 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2130 dnl Multiple response sets.
2131 7; 7; 1; COUNT("$a=Ex");
2136 "be a9e1dc63e2524882a5e3d2949a2da9d4" \
2137 "le ac709ca1928f65f47a8c8efdd9454b50"
2140 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2142 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2144 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2145 warning: `sys-file.sav' near offset 0xd8: Missing space following `E' at offset 4 in MRSETS record.
2150 AT_SETUP([unexpected label source in mrsets])
2151 AT_KEYWORDS([sack synthetic system file negative multiple response])
2152 AT_DATA([sys-file.sack], [dnl
2154 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2155 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2157 dnl Numeric variable, no label or missing values.
2158 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2160 dnl Multiple response sets.
2161 7; 7; 1; COUNT("$a=E 2");
2166 "be 8c710e85a0a1609d0d03dec80aaf5f94" \
2167 "le 4682440b82f22d4bd2ac56afb7fa3152"
2170 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2172 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2174 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2175 warning: `sys-file.sav' near offset 0xd8: Unexpected label source value `2' following `E' at offset 7 in MRSETS record.
2177 warning: `sys-file.sav' near offset 0xd8: Expecting digit at offset 7 in MRSETS record.
2182 AT_SETUP([bad type character in mrsets])
2183 AT_KEYWORDS([sack synthetic system file negative multiple response])
2184 AT_DATA([sys-file.sack], [dnl
2186 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2187 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2189 dnl Numeric variable, no label or missing values.
2190 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2192 dnl Multiple response sets.
2193 7; 7; 1; COUNT("$a=");
2198 "be fc5e5200d8f56b9a5a713e4a95313a3b" \
2199 "le 578a61e8a06b20216612f566c2050879"
2202 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2204 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2206 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2207 "warning: `sys-file.sav' near offset 0xd8: Missing `C', `D', or `E' at offset 3 in MRSETS record."
2212 AT_SETUP([bad counted string length in mrsets])
2213 AT_KEYWORDS([sack synthetic system file negative multiple response])
2214 AT_DATA([sys-file.sack], [dnl
2216 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2217 2; 1; 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 Multiple response sets.
2223 7; 7; 1; COUNT("$a=Dx");
2228 "be 23d0e2f65c7c5f93bbedcc0f2b260c69" \
2229 "le c3860c1d80e08842264948056e72c0db"
2232 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2234 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2236 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2237 warning: `sys-file.sav' near offset 0xd8: Expecting digit at offset 4 in MRSETS record.
2242 AT_SETUP([missing space in counted string in mrsets])
2243 AT_KEYWORDS([sack synthetic system file negative multiple response])
2244 AT_DATA([sys-file.sack], [dnl
2246 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2247 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2249 dnl Numeric variable, no label or missing values.
2250 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2252 dnl Multiple response sets.
2253 7; 7; 1; COUNT("$a=D1x");
2258 "be c9ce001723763e0698878b7e43a887e8" \
2259 "le e258a1e4491d5a1d1e7d2272ef631a22"
2262 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2264 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2266 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2267 warning: `sys-file.sav' near offset 0xd8: Expecting space at offset 5 in MRSETS record.
2272 AT_SETUP([counted string too long in mrsets])
2273 AT_KEYWORDS([sack synthetic system file negative multiple response])
2274 AT_DATA([sys-file.sack], [dnl
2276 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2277 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2279 dnl Numeric variable, no label or missing values.
2280 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2282 dnl Multiple response sets.
2283 7; 7; 1; COUNT("$a=D4 abc");
2288 "be 196d1266fa0e8e315769dcbe3130e3df" \
2289 "le 23df1ba7b77a26da8ce1c2cfbcaadce0"
2292 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2294 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2296 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2297 warning: `sys-file.sav' near offset 0xd8: 4-byte string starting at offset 6 exceeds record length 9.
2302 AT_SETUP([missing space after counted string in mrsets])
2303 AT_KEYWORDS([sack synthetic system file negative multiple response])
2304 AT_DATA([sys-file.sack], [dnl
2306 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2307 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2309 dnl Numeric variable, no label or missing values.
2310 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2312 dnl Multiple response sets.
2313 7; 7; 1; COUNT("$a=D3 abcx");
2318 "be 86314bb0bbdfad48c10af8b8d8106d6e" \
2319 "le 2b8d05ff501ca78e51f7110ce88a2364"
2322 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2324 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2326 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2327 warning: `sys-file.sav' near offset 0xd8: Expecting space at offset 9 following 3-byte string.
2332 AT_SETUP([missing newline after variable name in mrsets])
2333 AT_KEYWORDS([sack synthetic system file negative multiple response])
2334 AT_DATA([sys-file.sack], [dnl
2336 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2337 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2339 dnl Numeric variable, no label or missing values.
2340 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2342 dnl Multiple response sets.
2343 7; 7; 1; COUNT("$a=C 0 NUM1");
2348 "be cea939cf3e6a5f88cb45e8fa871c5e13" \
2349 "le 52135afec082f50f37eafacadbb2cd65"
2352 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2354 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2356 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2357 warning: `sys-file.sav' near offset 0xd8: Missing new-line parsing variable names at offset 13 in MRSETS record.
2359 warning: `sys-file.sav' near offset 0xd8: MRSET $a has only 1 variables.
2364 AT_SETUP([duplicate variable name in mrsets])
2365 AT_KEYWORDS([sack synthetic system file negative multiple response])
2366 AT_DATA([sys-file.sack], [dnl
2368 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2369 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2371 dnl Numeric variable, no label or missing values.
2372 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2374 dnl Multiple response sets.
2375 7; 7; 1; COUNT("$a=C 0 NUM1 NUM1"; i8 10);
2380 "be 4b1b5fa2dc22cf0afdd35422290b0a29" \
2381 "le e4304b57976440a036f25f8dd8ac1404"
2384 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2386 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2388 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2389 warning: `sys-file.sav' near offset 0xd8: Duplicate variable name NUM1 at offset 18 in MRSETS record.
2391 warning: `sys-file.sav' near offset 0xd8: MRSET $a has only 1 variables.
2396 AT_SETUP([mixed variable types in mrsets])
2397 AT_KEYWORDS([sack synthetic system file negative multiple response])
2398 AT_DATA([sys-file.sack], [dnl
2400 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2401 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2404 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2405 2; 8; 0; 0; 0x010800 *2; s8 "STR1";
2407 dnl Multiple response sets.
2408 7; 7; 1; COUNT("$a=C 0 NUM1 STR1"; i8 10);
2413 "be 0f130e967e4097823f85b8711eb20727" \
2414 "le 4dc987b4303fd115f1cae9be3963acc9"
2417 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2419 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2421 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2422 warning: `sys-file.sav' near offset 0xf8: MRSET $a contains both string and numeric variables.
2424 warning: `sys-file.sav' near offset 0xf8: MRSET $a has only 1 variables.
2429 AT_SETUP([missing newline after variable name in mrsets])
2430 AT_KEYWORDS([sack synthetic system file negative multiple response])
2431 AT_DATA([sys-file.sack], [dnl
2433 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2434 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2436 dnl Numeric variable, no label or missing values.
2437 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2439 dnl Multiple response sets.
2440 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10);
2445 "be 3a891e0a467afb3d622629c70f329ada" \
2446 "le 432998ec08370510411af4f5207c015e"
2449 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2451 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2453 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2454 warning: `sys-file.sav' near offset 0xd8: MRSET $a has only 1 variables.
2459 AT_SETUP([only one variable in mrset])
2460 AT_KEYWORDS([sack synthetic system file negative multiple response])
2461 AT_DATA([sys-file.sack], [dnl
2463 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2464 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2466 dnl Numeric variable, no label or missing values.
2467 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2469 dnl Multiple response sets.
2470 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10);
2475 "be 3a891e0a467afb3d622629c70f329ada" \
2476 "le 432998ec08370510411af4f5207c015e"
2479 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2481 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2483 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2484 warning: `sys-file.sav' near offset 0xd8: MRSET $a has only 1 variables.
2489 AT_SETUP([wrong display parameter size])
2490 AT_KEYWORDS([sack synthetic system file negative])
2491 AT_DATA([sys-file.sack], [dnl
2493 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2494 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2496 dnl Numeric variable, no label or missing values.
2497 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2499 dnl Display parameters record.
2500 7; 11; >>8<<; 2; 1.0; 1.0;
2502 dnl End of dictionary.
2506 "be 7c0f1ae47ae11e37d435c4abaceca226" \
2507 "le c29d05a1f8f15ed2201f31f8b787aaa0"
2510 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2512 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2514 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2515 "warning: `sys-file.sav' near offset 0xd8: Record type 7, subtype 11 has bad size 8 (expected 4)."
2520 AT_SETUP([wrong display parameter count])
2521 AT_KEYWORDS([sack synthetic system file negative])
2522 AT_DATA([sys-file.sack], [dnl
2524 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2525 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2527 dnl Numeric variable, no label or missing values.
2528 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2530 dnl Display parameters record.
2531 7; 11; 4; >>4<<; 1; 1; 2; 2;
2533 dnl End of dictionary.
2537 "be 372b57e73c69b05047b60bf6c596e2a1" \
2538 "le 2a550d8c5ceae4de7ced77df66e49d0f"
2541 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2543 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2545 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2546 warning: `sys-file.sav' near offset 0xd8: Extension 11 has bad count 4 (for 1 variables).
2551 AT_SETUP([wrong display measurement level])
2552 AT_KEYWORDS([sack synthetic system file negative])
2553 AT_DATA([sys-file.sack], [dnl
2555 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2556 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2558 dnl Numeric variable, no label or missing values.
2559 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2561 dnl Display parameters record.
2562 7; 11; 4; 2; >>4<<; 0;
2564 dnl End of dictionary.
2568 "be d43e7616b03743339f37292dec6c2204" \
2569 "le 821533c29a070cefdd8f07f4e1741d2a"
2572 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2574 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2576 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2577 warning: `sys-file.sav' near offset 0xd8: Invalid variable display parameters for variable 0 (NUM1). Default parameters substituted.
2582 AT_SETUP([wrong display alignment])
2583 AT_KEYWORDS([sack synthetic system file negative])
2584 AT_DATA([sys-file.sack], [dnl
2586 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2587 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2589 dnl Numeric variable, no label or missing values.
2590 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2592 dnl Display parameters record.
2593 7; 11; 4; 2; 1; >>-1<<;
2595 dnl End of dictionary.
2599 "be c54bc48b5767e2ec3a9ef31df790cb7c" \
2600 "le a4d8b14af64221abe83adb417d110e10"
2603 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2605 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
2607 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2608 warning: `sys-file.sav' near offset 0xd8: Invalid variable display parameters for variable 0 (NUM1). Default parameters substituted.
2613 AT_SETUP([bad variable name in variable/value pair])
2614 AT_KEYWORDS([sack synthetic system file negative])
2615 AT_DATA([sys-file.sack], [dnl
2617 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2618 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2620 dnl Numeric variables.
2621 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI";
2623 dnl Long variable names.
2624 7; 13; 1; COUNT (>>"xyzzy"<<);
2626 dnl Dictionary termination record.
2630 "be b67b6e3c1900e5a9cc691055008f0447" \
2631 "le 26cc52e601f830f9087a0ea2bd9527df"
2634 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2636 AT_DATA([sys-file.sps], [dnl
2637 GET FILE='sys-file.sav'.
2639 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2640 warning: `sys-file.sav' near offset 0xde: Dictionary record refers to unknown variable xyzzy.
2645 AT_SETUP([duplicate long variable name])
2646 AT_KEYWORDS([sack synthetic system file negative])
2647 AT_DATA([sys-file.sack], [dnl
2649 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2650 2; 4; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2652 dnl Numeric variables.
2653 2; 0; 0; 0; 0x050800 *2; s8 "LONGVARI";
2654 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_A";
2655 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_B";
2656 2; 0; 0; 0; 0x050800 *2; s8 "LONGVA_C";
2658 dnl Long variable names.
2660 "LONGVARI=_Invalid"; i8 9;
2661 "LONGVA_A=LongVariableName"; i8 9;
2662 "LONGVA_B=LONGVARIABLENAME"; i8 9;
2665 dnl Dictionary termination record.
2669 "be 9b4b4daa00084d984efb8f889bcb727c" \
2670 "le c1b1470d5cd615106e9ae507c9948d8e"
2673 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2675 AT_DATA([sys-file.sps], [dnl
2676 GET FILE='sys-file.sav'.
2678 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2679 warning: `sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name `_Invalid'.
2681 warning: `sys-file.sav' near offset 0x138: Duplicate long variable name `LONGVARIABLENAME'.
2686 AT_SETUP([bad very long string length])
2687 AT_KEYWORDS([sack synthetic system file negative])
2688 AT_DATA([sys-file.sack], [dnl
2690 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2691 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2693 dnl Numeric variable.
2694 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2696 dnl Very long string map.
2698 "NUM1=00000"; i8 0; i8 9;
2699 "NUM1=00255"; i8 0; i8 9;
2700 "NUM1=00256"; i8 0; i8 9;
2703 dnl Dictionary termination record.
2707 "be 1309d8d9fb24bcf08952dce9b0f39a94" \
2708 "le 94a39de88f8034001b3e467c4cc04d0f"
2711 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2713 AT_DATA([sys-file.sps], [dnl
2714 GET FILE='sys-file.sav'.
2716 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2717 warning: `sys-file.sav' near offset 0xd8: NUM1 listed as string of invalid length 00000 in very long string record.
2719 "warning: `sys-file.sav' near offset 0xd8: NUM1 listed in very long string record with width 00255, which requires only one segment."
2721 error: `sys-file.sav' near offset 0xd8: Very long string NUM1 overflows dictionary.
2726 AT_SETUP([bad very long string segment width])
2727 AT_KEYWORDS([sack synthetic system file negative])
2728 AT_DATA([sys-file.sack], [dnl
2730 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2731 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2734 2; 255; 0; 0; 0x01ff00 *2; s8 "STR1";
2735 (2; -1; 0; 0; 0; 0; s8 "") * 31;
2736 2; >>9<<; 0; 0; 0x010900 *2; s8 "STR1_A";
2737 >>2; -1; 0; 0; 0; 0; s8 "";<<
2739 dnl Very long string map.
2741 "STR1=00256"; i8 0; i8 9;
2744 dnl Dictionary termination record.
2748 "be 1d09a44a46859e6eda28e053dd4b7a8b" \
2749 "le 63b9ac0b3953f3e0d5ee248ebe257794"
2752 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2754 AT_DATA([sys-file.sps], [dnl
2755 GET FILE='sys-file.sav'.
2757 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2758 error: `sys-file.sav' near offset 0x4f8: Very long string with width 256 has segment 1 of width 9 (expected 4).
2763 AT_SETUP([too many value labels])
2764 dnl Skip the test if multiplying a small number by INT32_MAX would not
2765 dnl cause an overflow in size_t.
2766 AT_SKIP_IF([test $SIZEOF_SIZE_T -gt 4])
2767 AT_KEYWORDS([sack synthetic system file negative])
2768 AT_DATA([sys-file.sack], [dnl
2770 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2771 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2773 dnl Numeric variable.
2774 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2778 "be 975b2668dde395ddf619977958b37412" \
2779 "le 0c14aa278cfc2a4b801f91c14321f03b"
2782 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2784 AT_DATA([sys-file.sps], [dnl
2785 GET FILE='sys-file.sav'.
2787 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2788 error: `sys-file.sav' near offset 0xd4: Invalid number of labels 2147483647.
2793 AT_SETUP([missing type 4 record])
2794 AT_KEYWORDS([sack synthetic system file negative])
2795 AT_DATA([sys-file.sack], [dnl
2797 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2798 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2800 dnl Numeric variable.
2801 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2803 dnl Value label with missing type 4 record.
2804 3; 1; 1.0; i8 3; s7 "one";
2806 dnl End of dictionary.
2810 "be 5e1286ac92e3f25ff98492bc5019d608" \
2811 "le b33c12f776bbcaa43aa3bfdd4799e0c0"
2814 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2816 AT_DATA([sys-file.sps], [dnl
2817 GET FILE='sys-file.sav'.
2819 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2820 error: `sys-file.sav' near offset 0xe8: Variable index record (type 4) does not immediately follow value label record (type 3) as it should.
2825 AT_SETUP([value label with no associated variables])
2826 AT_KEYWORDS([sack synthetic system file negative])
2827 AT_DATA([sys-file.sack], [dnl
2829 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2830 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2832 dnl Numeric variable.
2833 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2835 dnl Value label with no variables.
2836 3; 1; 1.0; i8 3; s7 "one"; 4; >>0<<;
2839 "be b0dcec30a936cbcad21c4f3d6fe10fcf" \
2840 "le 3b9fdfce5c8c248048232fd6eac018e3"
2843 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2845 AT_DATA([sys-file.sps], [dnl
2846 GET FILE='sys-file.sav'.
2848 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2849 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).
2854 AT_SETUP([type 4 record names long string variable])
2855 AT_KEYWORDS([sack synthetic system file negative])
2856 AT_DATA([sys-file.sack], [dnl
2858 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2859 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2861 dnl Long string variable.
2862 2; 9; 0; 0; 0x010900 *2; s8 "STR1";
2863 2; -1; 0; 0; 0; 0; s8 "";
2865 dnl Value label that names long string variable.
2866 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 1; >>1<<;
2868 dnl End of dictionary.
2872 "be 14053a4f09de4c7c4c55281534dd66f4" \
2873 "le 8a61cc994c659fd66307d2f0fd64ce20"
2876 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
2877 AT_DATA([sys-file.sps], [dnl
2878 GET FILE='sys-file.sav'.
2880 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2881 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.
2886 AT_SETUP([variables for value label must all be same type])
2887 AT_KEYWORDS([sack synthetic system file negative])
2888 AT_DATA([sys-file.sack], [dnl
2890 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2891 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2894 2; 6; 0; 0; 0x010600 *2; s8 "STR1";
2895 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2897 dnl Value label that names numeric and string variables.
2898 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 2<<;
2900 dnl End of dictionary.
2904 "be 7577c456726a88f52bbef63a8b47bf1a" \
2905 "le 3ba5c6af9ad0ae5cc88f9f63e726e414"
2908 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [ignore])
2909 AT_DATA([sys-file.sps], [dnl
2910 GET FILE='sys-file.sav'.
2912 AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl
2913 "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."
2918 AT_SETUP([duplicate value labels type])
2919 AT_KEYWORDS([sack synthetic system file negative])
2920 AT_DATA([sys-file.sack], [dnl
2922 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2923 2; 2; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2926 2; 6; 0; 0; 0x010600 *2; s8 "STR1";
2927 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
2929 dnl Duplicate value labels.
2930 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 1<<;
2931 3; 1; 1.0; i8 3; s7 "one"; 4; 2; >>2; 2<<;
2933 dnl End of dictionary.
2937 "be ef0f5b2ebddb5a3bfcda16c93a2508f4" \
2938 "le c00e27abd9a6c06bf29a108d7220435a"
2941 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2943 AT_DATA([sys-file.sps], [dnl
2944 GET FILE='sys-file.sav'.
2946 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2947 warning: `sys-file.sav' near offset 0xf4: Duplicate value label for `xyzzy ' on STR1.
2949 warning: `sys-file.sav' near offset 0x11c: Duplicate value label for 1 on NUM1.
2954 AT_SETUP([missing attribute value])
2955 AT_KEYWORDS([sack synthetic system file negative])
2956 AT_DATA([sys-file.sack], [dnl
2958 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
2959 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
2962 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR";
2964 dnl Data file attributes record.
2969 dnl Variable attributes record.
2975 dnl Dictionary termination record.
2979 "be 0fc71f5e3cdb6b7f2dd73d011d4885c2" \
2980 "le e519b44715400156a2bfe648eb5cff34"
2983 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
2985 AT_DATA([sys-file.sps], [dnl
2986 GET FILE='sys-file.sav'.
2988 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
2989 warning: `sys-file.sav' near offset 0xde: Error parsing attribute value Attr1[[1]].
2991 warning: `sys-file.sav' near offset 0x101: Error parsing attribute value fred[[2]].
2996 AT_SETUP([unquoted attribute value])
2997 AT_KEYWORDS([sack synthetic system file negative])
2998 AT_DATA([sys-file.sack], [dnl
3000 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3001 2; 1; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3004 2; 0; 0; 0; 0x050800 *2; s8 "FIRSTVAR";
3006 dnl Data file attributes record.
3008 "Attr1(value"; i8 10;
3012 dnl Variable attributes record.
3015 "fred(23"; i8 10; ")"
3018 dnl Dictionary termination record.
3022 "be 33dba37c2247e63c04bb74a7b472293d" \
3023 "le 041025a9d9d9e21a7fabd90ba7341934"
3026 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3028 AT_DATA([sys-file.sps], [dnl
3029 GET FILE='sys-file.sav'.
3031 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3032 warning: `sys-file.sav' near offset 0xe4: Attribute value Attr1[[1]] is not quoted: value.
3034 warning: `sys-file.sav' near offset 0x106: Attribute value fred[[1]] is not quoted: 23.
3039 AT_SETUP([bad variable name in long string value label])
3040 AT_KEYWORDS([sack synthetic system file negative])
3041 AT_DATA([sys-file.sack], [dnl
3043 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3044 2; 3; 1; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3047 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3048 2; 14; 0; 0; 0x010e00 *2; s8 "STR14";
3049 2; -1; 0; 0; 0; 0; s8 "";
3052 dnl No variable named STR9.
3053 COUNT(>>"STR9"<<); 9;
3054 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'");
3056 dnl NUM1 is numeric.
3057 COUNT(>>"NUM1"<<); 0;
3058 1; COUNT("xyz"); COUNT("value label for 1.0");
3060 dnl Wrong width for STR14.
3061 COUNT("STR14"); >>9<<;
3062 1; COUNT("RSTUVWXYZ"); COUNT("value label for `RSTUVWXYZ'");
3064 dnl Wrong width for value.
3066 1; COUNT(>>"RSTUVWXYZ"<<); COUNT("value label for `RSTUVWXYZ'");
3068 dnl Duplicate value label.
3069 COUNT("STR14"); 14; 2;
3070 COUNT("abcdefghijklmn"); COUNT("value label for `abcdefghijklmn'");
3071 >>COUNT("abcdefghijklmn"); COUNT("another value label for `abcdefghijklmn'")<<;
3074 dnl Dictionary termination record.
3078 "be cf2e883dadb00e2c6404c09ea0a4e388" \
3079 "le 89c340faf0a7e4a8c834f9687684c091"
3082 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3084 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3086 AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl
3087 warning: `sys-file.sav' near offset 0x128: Ignoring long string value record for unknown variable STR9.
3089 warning: `sys-file.sav' near offset 0x164: Ignoring long string value record for numeric variable NUM1.
3091 warning: `sys-file.sav' near offset 0x193: Ignoring long string value record for variable STR14 because the record's width (9) does not match the variable's width (14).
3093 "warning: `sys-file.sav' near offset 0x1d4: Ignoring long string value 0 for variable str14, with width 14, that has bad value width 9."
3095 warning: `sys-file.sav' near offset 0x259: Duplicate value label for `abcdefghijklmn' on str14.
3100 AT_SETUP([fewer data records than indicated by file header])
3101 AT_KEYWORDS([sack synthetic system file negative])
3102 AT_DATA([sys-file.sack], [dnl
3104 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3105 2; 2; 0; 0; >>5<<; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3107 dnl Numeric variables.
3108 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3109 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
3117 dnl Missing record here.
3120 "be 6ee097c3934055d0c4564641636f4b5a" \
3121 "le ae03fe1b888091d6938b5a436d44ac60"
3124 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3126 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3129 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
3130 [error: Error reading case from file `sys-file.sav'.
3142 AT_SETUP([partial data record between variables])
3143 AT_KEYWORDS([sack synthetic system file negative])
3144 AT_DATA([sys-file.sack], [dnl
3146 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3147 2; 2; 0; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3149 dnl Numeric variables.
3150 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3151 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
3159 "be 4bcc085d7d8f0f09c6a4ba8064ffe61c" \
3160 "le 7387fc5edd2740aff92c30ca688d6d9b"
3163 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3165 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3168 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
3169 [error: `sys-file.sav' near offset 0x110: File ends in partial case.
3178 AT_SETUP([partial data record within long string])
3179 AT_KEYWORDS([sack synthetic system file negative])
3180 AT_DATA([sys-file.sack], [dnl
3182 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3183 2; 2; 0; 0; -1; 100.0; "01 Jan 11"; "20:53:52"; s64 ""; i8 0 *3;
3185 dnl Numeric variables.
3186 2; 14; 0; 0; 0x010e00 *2; s8 "STR14";
3187 2; -1; 0; 0; 0; 0; s8 "";
3191 s14 "one data item";
3195 "be 4a9e84f9e679afb7bb71acd0bb7eab89" \
3196 "le 30752606f14ee2deec2854e8e6de4b3b"
3199 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3201 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3204 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
3205 [error: `sys-file.sav' near offset 0x10e: Unexpected end of file.
3214 AT_SETUP([partial compressed data record])
3215 AT_KEYWORDS([sack synthetic system file positive])
3216 AT_DATA([sys-file.sack], [dnl
3218 "$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file";
3220 6; dnl Nominal case size
3223 -1; dnl Unspecified number of cases.
3225 "01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file";
3228 dnl Numeric variables.
3229 2; 0; 0; 0; 0x050800 *2; s8 "NUM1";
3230 2; 0; 0; 0; 0x050800 *2; s8 "NUM2";
3232 dnl String variable.
3233 2; 4; 0; 0; 0x010400 *2; s8 "STR4";
3234 2; 8; 0; 0; 0x010800 *2; s8 "STR8";
3235 2; 15; 0; 0; 0x010f00 *2; s8 "STR15";
3236 2; -1; 0; 0; 0; 0; s8 "";
3238 dnl Dictionary termination record.
3241 dnl Compressed data.
3242 i8 1 100 254 253 254 253; i8 255 251; "abcdefgh"; s8 "0123";
3245 "be ef01b16e2e397d979a3a7d20725ebe6d" \
3246 "le 51f7a61e9bc68992469d16c55d6ecd88"
3249 AT_CHECK_UNQUOTED([sack --$[1] sys-file.sack > sys-file.sav], [0], [], [$[2]
3251 AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'.
3254 AT_CHECK([pspp -O format=csv sys-file.sps], [1],
3255 [error: `sys-file.sav' near offset 0x190: File ends in partial case.
3258 num1,num2,str4,str8,str15
3259 -99,0,,abcdefgh,0123 @&t@