+ AT_CHECK_UNQUOTED([dd if=foo.sav bs=1 count=4; echo], [0], [$magic
+], [ignore])
+done
+AT_CLEANUP
+
+AT_SETUP([write and read long string value labels and missing values])
+AT_KEYWORDS([SAVE GET system file])
+for variant in 'UNCOMPRESSED $FL2' 'ZCOMPRESSED $FL3'; do
+ set $variant
+ compression=$1 magic=$2
+ cat >sysfile.sps <<EOF
+DATA LIST LIST NOTABLE/s1 s2 s3 (a9).
+BEGIN DATA
+a b c
+END DATA.
+
+VALUE LABELS
+ /s1 'abc' 'First value label'
+ 'abcdefgh' 'Second value label'
+ 'abcdefghi' 'Third value label'
+ /s2 '0' 'Fourth value label'
+ '01234567' 'Fifth value label'
+ '012345678' 'Sixth value label'.
+
+MISSING VALUES
+ s1 ('0')
+ /s2 ('12' '123')
+ /s3 ('1234' '12345' '12345678').
+
+SAVE/$compression /OUTFILE='foo.sav'.
+GET /FILE='foo.sav'.
+DISPLAY DICTIONARY.
+EOF
+ AT_CHECK([pspp -o pspp.csv sysfile.sps])
+ AT_CHECK([cat pspp.csv], [0], [dnl
+Variable,Description,Position
+s1,"Format: A9
+Missing Values: ""0 ""
+
+Value,Label
+abc ,First value label
+abcdefgh ,Second value label
+abcdefghi,Third value label",1
+s2,"Format: A9
+Missing Values: ""12 ""; ""123 ""
+
+Value,Label
+0 ,Fourth value label
+01234567 ,Fifth value label
+012345678,Sixth value label",2
+s3,"Format: A9
+Missing Values: ""1234 ""; ""12345 ""; ""12345678""",3
+])
+ AT_CHECK_UNQUOTED([dd if=foo.sav bs=1 count=4; echo], [0], [$magic
+], [ignore])
+done