X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fdata%2Fsys-file.at;h=e726d535404934a6396a640681904baa570f0c2b;hb=52eef93a40a3a18c594c38d4697406eba83f4321;hp=e82166c9054c378e24933a35cb07e4e24d4de0e1;hpb=edfe2dfe589dcb48bf12942aeeb7b057bb1ebb35;p=pspp-builds.git diff --git a/tests/data/sys-file.at b/tests/data/sys-file.at index e82166c9..e726d535 100644 --- a/tests/data/sys-file.at +++ b/tests/data/sys-file.at @@ -37,7 +37,36 @@ variable001,variable002,variable003,variable004 ]) AT_CLEANUP +AT_SETUP([write and read compressed files]) +AT_KEYWORDS([SAVE GET system file]) +AT_DATA([sysfile.sps], [dnl +DATA LIST LIST NOTABLE /x * y (a200). +BEGIN DATA. +1.2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +. yyyyyyyyyyyyyyy +0 ddddddddddddddddddddddddddddddd +101 z +END DATA. + +SAVE OUTFILE='com.sav' /COMPRESS . + +GET FILE='com.sav'. + +LIST. +]) +AT_CHECK([pspp -o pspp.csv sysfile.sps]) +dnl Make sure file really was compressd. +AT_CHECK([dd if=com.sav bs=1 skip=72 count=4 2> /dev/null | od | sed '1q' > com.txt]) +dnl Allow big- or little-endian format. +AT_CHECK( + [(echo '0000000 000000 000001' | diff com.txt -) || + (echo '0000000 000001 000000' | diff com.txt -)], [0], + [ignore]) +AT_CAPTURE_FILE([com.txt]) +AT_CLEANUP + AT_SETUP([nonempty case_map doesn't crash]) +AT_KEYWORDS([SAVE system file]) AT_DATA([save.sps], [dnl INPUT PROGRAM. COMPUTE #I = 1.