X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fdata%2Fsys-file-reader.at;h=7bd0ddf6449384448f9fb86c59ae71a3e7bdc8aa;hb=26d835f97534b20825b3121e326c288e994753f8;hp=e9b262e86425d8a23ce7fd5629b5516b6d2d208c;hpb=0df9cdd3df66caf4353128feff3008289cda8115;p=pspp diff --git a/tests/data/sys-file-reader.at b/tests/data/sys-file-reader.at index e9b262e864..7bd0ddf644 100644 --- a/tests/data/sys-file-reader.at +++ b/tests/data/sys-file-reader.at @@ -1557,6 +1557,43 @@ AT_CLEANUP AT_BANNER([system file reader - negative]) +AT_SETUP([no variables]) +AT_KEYWORDS([sack synthetic system file negative]) +AT_DATA([sys-file.sack], [dnl +dnl File header. +"$FL2"; s60 "$(#) SPSS DATA FILE PSPP synthetic test file"; +2; dnl Layout code +0; dnl Nominal case size (empty) +0; dnl Not compressed +0; dnl Not weighted +0; dnl 0 cases. +100.0; dnl Bias. +"01 Jan 11"; "20:53:52"; s64 "PSPP synthetic test file"; +i8 0 *3; + +dnl Character encoding record. +7; 20; 1; 12; "windows-1252"; + +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 FILE='sys-file.sav'. +]) + AT_CHECK([pspp -O format=csv sys-file.sps], [1], [dnl +sys-file.sps:1: error: GET: `sys-file.sav': Data file dictionary has no variables. +]) + + dnl At one point pspp-convert would hang forever if there were no variables, + dnl so check against regression. + AT_CHECK([pspp-convert sys-file.sav sys-file.txt]) + AT_CHECK([cat sys-file.txt], [0], [ +]) +done +AT_CLEANUP + AT_SETUP([unspecified character encoding]) AT_KEYWORDS([sack synthetic system file positive]) AT_DATA([sys-file.sack], [dnl @@ -2225,8 +2262,8 @@ for variant in be le; do AT_DATA([sys-file.sps], [dnl GET FILE='sys-file.sav'. ]) - AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl -"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." + AT_CHECK_UNQUOTED([pspp -O format=csv sys-file.sps], [0], [dnl +"warning: \`sys-file.sav' near offset 0xd8: Unrecognized record type 7, subtype 30. For help, please send this file to ${PACKAGE_BUGREPORT} and mention that you were using ${PACKAGE_STRING}." ]) done AT_CLEANUP @@ -3027,6 +3064,8 @@ dnl Numeric variables. dnl Long variable names. 7; 13; 1; COUNT ( "LONGVARI=_Invalid"; i8 9; +"LONGVARI=$Invalid"; i8 9; +"LONGVARI=#Invalid"; i8 9; "LONGVA_A=LongVariableName"; i8 9; "LONGVA_B=LONGVARIABLENAME"; i8 9; ); @@ -3045,6 +3084,10 @@ GET FILE='sys-file.sav'. AT_CHECK([pspp -O format=csv sys-file.sps], [0], [dnl warning: `sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name `_Invalid'. +warning: `sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name `$Invalid'. + +warning: `sys-file.sav' near offset 0x138: Long variable mapping from LONGVARI to invalid variable name `#Invalid'. + warning: `sys-file.sav' near offset 0x138: Duplicate long variable name `LONGVARIABLENAME'. ]) done