X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fdata%2Fsys-file-reader.at;h=7291e836e6a398bc0f41578cc93e472906da28fa;hb=1e0e76eaeb51ef0c15fdcfc4bd12d9310c16a88b;hp=e181b26eb580d691ef3d54b99d5b8b1b9f4f6511;hpb=c2b953d03cc404e6edfd57f9dce96493b5ea834a;p=pspp diff --git a/tests/data/sys-file-reader.at b/tests/data/sys-file-reader.at index e181b26eb5..7291e836e6 100644 --- a/tests/data/sys-file-reader.at +++ b/tests/data/sys-file-reader.at @@ -205,6 +205,9 @@ dnl Numeric variable, variable label. 2; 0; 1; 0; 0x050800 *2; s8 "NUM2"; 26; "Numeric variable 2's label"; i8 0 *2; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; @@ -256,6 +259,9 @@ dnl Numeric variable, variable label. dnl Machine integer info record (SPSS 13). 7; 3; 4; 8; 13; 2; 3; -1; 1; 1; ENDIAN; 1252; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; @@ -668,6 +674,9 @@ dnl Numeric variables. dnl Extra product info. 7; 10; 1; COUNT ("Extra product info"; i8 13; "another line"; i8 13; "blah"); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -740,6 +749,9 @@ dnl Variable display parameters 0; 1; 0; 2; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -855,6 +867,9 @@ dnl Variable display parameters 0; 11; 1; 0; 12; 2; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -1250,6 +1265,9 @@ dnl String variable. 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; @@ -1309,6 +1327,9 @@ dnl String variable. 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; @@ -1368,6 +1389,9 @@ dnl String variable. 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; @@ -1431,12 +1455,15 @@ dnl String variable. 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; dnl ZLIB data header. -i64 0x178; # zheader_ofs -i64 0x1e9; # ztrailer_ofs +i64 0x194; # zheader_ofs +i64 0x205; # ztrailer_ofs i64 48; # ztrailer_len dnl ZLIB data block. @@ -1465,8 +1492,8 @@ i64 0; # ztrailer_zero 1; # n_blocks dnl ZLIB block descriptor: -i64 0x178; # uncompressed_ofs -i64 0x190; # compressed_ofs +i64 0x194; # uncompressed_ofs +i64 0x1ac; # compressed_ofs 88; # uncompressed_size 89; # compressed_size EOF @@ -1503,6 +1530,42 @@ AT_CLEANUP AT_BANNER([system file reader - negative]) +AT_SETUP([unspecified character encoding]) +AT_KEYWORDS([sack synthetic system file positive]) +AT_DATA([sys-file.sack], [dnl +dnl File header. +"$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; +2; dnl Layout code +4; dnl Nominal case size +0; dnl Not compressed +0; dnl Not weighted +0; dnl No cases. +100.0; dnl Bias. +"01 Jan 11"; "20:53:52"; +"PSPP synthetic test file: "; i8 244; i8 245; i8 246; i8 248; s34 ""; +i8 0 *3; + +dnl Numeric variables. +2; 0; 0; 0; 0x050800 *2; s8 "A"; +2; 0; 0; 0; 0x050800 *2; s8 "B"; +2; 0; 0; 0; 0x050800 *2; s8 "C"; +2; 0; 0; 0; 0x050800 *2; s8 "D"; + +dnl Dictionary termination record. +999; 0; +]) +for variant in be le; do + AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) + AT_DATA([sys-file.sps], [dnl +GET 'sys-file.sav'. +]) + AT_CHECK([pspp -O format=csv sys-file.sps], [0], [stdout]) + AT_CHECK([sed 's/default encoding.*For/default encoding. For/' stdout], [0], [dnl +"warning: `sys-file.sav': This system file does not indicate its own character encoding. Using default encoding. For best results, specify an encoding explicitly. Use SYSFILE INFO with ENCODING=""DETECT"" to analyze the possible encodings." +]) +done +AT_CLEANUP + AT_SETUP([misplaced type 4 record]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl @@ -1559,6 +1622,9 @@ dnl File header. dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1582,6 +1648,9 @@ dnl File header. dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 >>"$UM1"<<; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1605,6 +1674,9 @@ dnl File header. dnl Numeric variable. 2; 0; 0; 0; 0x050800 *2; s8 >>"TO"<<; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1628,6 +1700,9 @@ dnl File header. dnl String variable with invalid width 256. 2; 256; 0; 0; 0x050800 *2; s8 "VAR1"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1654,6 +1729,9 @@ dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "VAR1"; 2; 0; 0; 0; 0x050800 *2; s8 "VAR1"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1688,6 +1766,9 @@ dnl File header. dnl Numeric variable. 2; 0; >>2<<; 0; 0x050800 *2; s8 "VAR1"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1711,6 +1792,9 @@ dnl File header. dnl Numeric variable. 2; 0; 0; >>-1<<; 0x050800 *2; s8 "VAR1"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1734,6 +1818,9 @@ dnl File header. dnl String variable. 2; 8; 0; >>4<<; 0x010800 *2; s8 "VAR1"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1758,6 +1845,9 @@ dnl String variable. 2; 10; 0; 0; 0x010a00 *2; s8 "VAR1"; >>2; 0; 0; 0; 0x050800 *2; s8 "VAR2";<< +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1792,6 +1882,9 @@ dnl String variable, numeric formats. dnl String variable, wrong width formats. 2; 4; 0; 0; >>0x010800<<; >>0x020400<<; s8 "STR2"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1931,6 +2024,9 @@ dnl Numeric variable. dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR1"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1968,6 +2064,9 @@ dnl Numeric variable. dnl String variable. 2; 4; 0; 0; 0x010400 *2; s8 "STR1"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -1995,6 +2094,9 @@ dnl Long string variable. 2; 9; 0; 0; 0x010900 *2; s8 "STR1"; (2; -1; 0; 0; 0; 0; s8 ""); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2024,6 +2126,9 @@ dnl Two document records. dnl Dictionary termination record. 999; 0; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Data. 1.0; ]) @@ -2106,6 +2211,9 @@ dnl Numeric variable, no label or missing values. dnl Unknown extension record type. 7; 30; 1; 1; i8 0; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2133,6 +2241,9 @@ dnl Numeric variable, no label or missing values. dnl Machine integer info record. 7; 3; 4; >>9<<; 1; 2; 3; -1; 1; 1; ENDIAN; 1252; >>1234<<; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2160,6 +2271,9 @@ dnl Numeric variable, no label or missing values. dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; >>2<<; 1; ENDIAN; 1252; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2187,6 +2301,9 @@ dnl Numeric variable, no label or missing values. dnl Machine integer info record. 7; 3; 4; 8; 1; 2; 3; -1; 1; 1; >>3<<; 1252; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2223,6 +2340,9 @@ dnl Numeric variable, no label or missing values. dnl Machine floating-point info record. 7; 4; 8; >>4<<; SYSMIS; HIGHEST; LOWEST; 0.0; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2250,6 +2370,9 @@ dnl Numeric variable, no label or missing values. dnl Machine floating-point info record. 7; 4; 8; 3; >>0.0<<; >>1.0<<; >>2.0<<; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2380,6 +2503,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=Cx"); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2405,6 +2531,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=Ex"); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2430,6 +2559,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=E 2"); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2457,6 +2589,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a="); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2482,6 +2617,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=Dx"); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2507,6 +2645,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=D1x"); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2532,6 +2673,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=D4 abc"); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2557,6 +2701,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=D3 abcx"); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2582,6 +2729,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1"); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2609,6 +2759,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1 NUM1"; i8 10); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2637,6 +2790,9 @@ dnl Variables. dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1 STR1"; i8 10); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2664,6 +2820,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2689,6 +2848,9 @@ dnl Numeric variable, no label or missing values. dnl Multiple response sets. 7; 7; 1; COUNT("$a=C 0 NUM1"; i8 10; "$b=C 0 "; i8 10); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + 999; 0; ]) for variant in be le; do @@ -2716,6 +2878,9 @@ dnl Numeric variable, no label or missing values. dnl Display parameters record. 7; 11; >>8<<; 2; 1.0; 1.0; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2742,6 +2907,9 @@ dnl Numeric variable, no label or missing values. dnl Display parameters record. 7; 11; 4; >>4<<; 1; 1; 2; 2; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2768,6 +2936,9 @@ dnl Numeric variable, no label or missing values. dnl Display parameters record. 7; 11; 4; 2; >>4<<; 0; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2794,6 +2965,9 @@ dnl Numeric variable, no label or missing values. dnl Display parameters record. 7; 11; 4; 2; 1; >>-1<<; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -2820,6 +2994,9 @@ dnl Numeric variables. dnl Long variable names. 7; 13; 1; COUNT (>>"xyzzy"<<); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -2854,6 +3031,9 @@ dnl Long variable names. "LONGVA_B=LONGVARIABLENAME"; i8 9; ); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -2887,6 +3067,9 @@ dnl Very long string map. "NUM1=00256"; i8 0; i8 9; ); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -2923,6 +3106,9 @@ dnl Very long string map. "STR1=00256"; i8 0; i8 9; ); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -2938,9 +3124,6 @@ done AT_CLEANUP AT_SETUP([too many value labels]) -dnl Skip the test if multiplying a small number by INT32_MAX would not -dnl cause an overflow in size_t. -AT_SKIP_IF([test $SIZEOF_SIZE_T -gt 4]) AT_KEYWORDS([sack synthetic system file negative]) AT_DATA([sys-file.sack], [dnl dnl File header. @@ -2975,6 +3158,9 @@ dnl Numeric variable. dnl Value label with missing type 4 record. 3; 1; 1.0; i8 3; s7 "one"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. >>999; 0<<; ]) @@ -3027,6 +3213,9 @@ dnl Long string variable. dnl Value label that names long string variable. 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 1; >>1<<; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -3055,6 +3244,9 @@ dnl Variables. dnl Value label that names numeric and string variables. 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 2<<; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -3084,6 +3276,9 @@ dnl Duplicate value labels. 3; 1; s8 "xyzzy"; i8 3; s7 "one"; 4; 2; >>1; 1<<; 3; 1; 1.0; i8 3; s7 "one"; 4; 2; >>2; 2<<; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl End of dictionary. 999; 0; ]) @@ -3121,6 +3316,9 @@ dnl Variable attributes record. "fred('23'"; i8 10 ); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -3159,6 +3357,9 @@ dnl Variable attributes record. "fred(23"; i8 10; ")" ); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -3210,6 +3411,9 @@ COUNT("abcdefghijklmn"); COUNT("value label for `abcdefghijklmn'"); >>COUNT("abcdefghijklmn"); COUNT("another value label for `abcdefghijklmn'")<<; ); +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; ]) @@ -3242,6 +3446,9 @@ dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Data. 999; 0; 1.0; 2.0; @@ -3279,6 +3486,9 @@ dnl Numeric variables. 2; 0; 0; 0; 0x050800 *2; s8 "NUM1"; 2; 0; 0; 0; 0x050800 *2; s8 "NUM2"; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Data. 999; 0; 1.0; 2.0; @@ -3290,7 +3500,7 @@ for variant in be le; do LIST. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], - [error: `sys-file.sav' near offset 0x110: File ends in partial case. + [error: `sys-file.sav' near offset 0x12c: File ends in partial case. Table: Data List num1,num2 @@ -3310,6 +3520,9 @@ dnl Numeric variables. 2; 14; 0; 0; 0x010e00 *2; s8 "STR14"; 2; -1; 0; 0; 0; 0; s8 ""; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Data. 999; 0; s14 "one data item"; @@ -3321,7 +3534,7 @@ for variant in be le; do LIST. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], - [error: `sys-file.sav' near offset 0x10e: Unexpected end of file. + [error: `sys-file.sav' near offset 0x12a: Unexpected end of file. Table: Data List str14 @@ -3354,6 +3567,9 @@ dnl String variable. 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; @@ -3366,7 +3582,7 @@ for variant in be le; do LIST. ]) AT_CHECK([pspp -O format=csv sys-file.sps], [1], - [error: `sys-file.sav' near offset 0x190: File ends in partial case. + [error: `sys-file.sav' near offset 0x1ac: File ends in partial case. Table: Data List num1,num2,str4,str8,str15 @@ -3382,7 +3598,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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). + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x194: Wrong ZLIB data header offset 0 (expected 0x194). ]) done AT_CLEANUP @@ -3394,7 +3610,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x178: Impossible ZLIB trailer offset 0x0. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x194: Impossible ZLIB trailer offset 0x0. ]) done AT_CLEANUP @@ -3408,7 +3624,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x178: Invalid ZLIB trailer length 12. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x194: Invalid ZLIB trailer length 12. ]) done AT_CLEANUP @@ -3421,8 +3637,8 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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). -error: `sys-file.sav' near offset 0x201: 72-byte ZLIB trailer specifies 1 data blocks (expected 2). + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x1ac: End of ZLIB trailer (0x24d) is not file size (0x235). +error: `sys-file.sav' near offset 0x21d: 72-byte ZLIB trailer specifies 1 data blocks (expected 2). ]) done AT_CLEANUP @@ -3434,7 +3650,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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). + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x20d: ZLIB trailer bias (0) differs from file header bias (100.00). ]) done AT_CLEANUP @@ -3446,7 +3662,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x215: ZLIB trailer "zero" field has nonzero value 100. ]) done AT_CLEANUP @@ -3458,7 +3674,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x219: ZLIB trailer specifies unexpected 4096-byte block size. ]) done AT_CLEANUP @@ -3470,7 +3686,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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). + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: 48-byte ZLIB trailer specifies 2 data blocks (expected 1). ]) done AT_CLEANUP @@ -3482,7 +3698,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported uncompressed data offset 0x177, when 0x194 was expected. ]) done AT_CLEANUP @@ -3494,7 +3710,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported compressed data offset 0x191, when 0x1ac was expected. ]) done AT_CLEANUP @@ -3523,12 +3739,15 @@ dnl String variable. 2; 15; 0; 0; 0x010f00 *2; s8 "STR15"; 2; -1; 0; 0; 0; 0; s8 ""; +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + dnl Dictionary termination record. 999; 0; dnl ZLIB data header. -i64 0x178; # zheader_ofs -i64 0x190; # ztrailer_ofs +i64 0x194; # zheader_ofs +i64 0x1ac; # ztrailer_ofs i64 72; # ztrailer_len dnl This is where the ZLIB data blocks would go, but we don't need any to @@ -3541,14 +3760,14 @@ i64 0; # ztrailer_zero 2; # n_blocks dnl ZLIB block descriptor 1: -i64 0x178; # uncompressed_ofs -i64 0x190; # compressed_ofs +i64 0x194; # uncompressed_ofs +i64 0x1ac; # compressed_ofs 0x100000; # uncompressed_size 0x12345; # compressed_size dnl ZLIB block descriptor 2: -i64 0x100178; # uncompressed_ofs -i64 0x12405; # compressed_ofs +i64 0x100194; # uncompressed_ofs +i64 0x12421; # compressed_ofs 0x100000; # uncompressed_size 0x12345; # compressed_size ]) @@ -3556,8 +3775,8 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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. -error: `sys-file.sav' near offset 0x1c0: ZLIB block descriptor 1 reported compressed data offset 0x12405, when 0x124d5 was expected. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [warning: `sys-file.sav' near offset 0x1c4: ZLIB block descriptor 0 reported block size 0x100000, when 0x3ff000 was expected. +error: `sys-file.sav' near offset 0x1dc: ZLIB block descriptor 1 reported compressed data offset 0x12421, when 0x124f1 was expected. ]) done AT_CLEANUP @@ -3569,7 +3788,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [0], [warning: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reported block size 0x400000, when at most 0x3ff000 was expected. ]) done AT_CLEANUP @@ -3582,7 +3801,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x21d: ZLIB block descriptor 0 reports compressed size 100 and uncompressed size 50. ]) done AT_CLEANUP @@ -3594,7 +3813,7 @@ for variant in be le; do AT_CHECK([sack --$variant sys-file.sack > sys-file.sav]) AT_DATA([sys-file.sps], [GET FILE='sys-file.sav'. ]) - 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. + AT_CHECK([pspp -o pspp.csv sys-file.sps], [1], [error: `sys-file.sav' near offset 0x235: ZLIB trailer is at offset 0x205 but 0x204 would be expected from block descriptors. ]) done AT_CLEANUP