1 AT_BANNER([portable files])
3 AT_SETUP([overwriting portable file])
4 AT_DATA([output.por], [abcdef
6 cp output.por output.por.backup
7 AT_DATA([porfile.sps], [dnl
12 EXPORT OUTFILE='output.por'.
14 AT_CHECK([pspp -O format=csv porfile.sps])
15 AT_CHECK([cmp output.por output.por.backup], [1], [ignore])
18 AT_SETUP([overwriting portable file atomically])
19 AT_DATA([output.por], [abcdef
21 cp output.por output.por.backup
22 AT_DATA([porfile.sps],
23 [[DATA LIST NOTABLE/x 1.
27 XEXPORT OUTFILE='output.por'.
28 HOST COMMAND=['kill -TERM $PPID'].
30 AT_CHECK([pspp -O format=csv porfile.sps], [143], [], [ignore])
31 AT_CHECK([cmp output.por output.por.backup])
33 [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done])
36 AT_SETUP([write to same portable file being read])
37 AT_DATA([export.sps], [dnl
38 DATA LIST NOTABLE/x 1.
42 EXPORT OUTFILE='data.por'.
44 AT_CHECK([pspp -O format=csv export.sps])
45 AT_CHECK([test -s data.por])
47 [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done])
48 AT_DATA([export2.sps], [dnl
49 IMPORT FILE='data.por'.
51 EXPORT OUTFILE='data.por'.
53 AT_CHECK([pspp -O format=csv export2.sps])
55 [for file in *.tmp*; do if test -e $file; then echo $file; exit 1; fi; done])
56 AT_DATA([export3.sps], [dnl
57 IMPORT FILE='data.por'.
60 AT_CHECK([pspp -O format=csv export3.sps], [0], [dnl
67 dnl This checks for a bug in the portable file writer that caused an infinite
68 dnl loop in some cases, and other problems in other cases, when a variable
70 AT_SETUP([write portable file with value labels])
71 AT_DATA([export.sps], [dnl
72 DATA LIST NOTABLE/var1 TO var5 1-5.
82 EXPORT OUTFILE='data.por'.
84 AT_CHECK([pspp -O format=csv export.sps])
85 AT_DATA([import.sps], [dnl
86 IMPORT FILE='data.por'.
90 AT_CHECK([pspp -O format=csv import.sps], [0], [dnl
91 Variable,Description,,Position
94 ,Display Alignment: Right,,
99 ,Display Alignment: Right,,
104 ,Display Alignment: Right,,
109 ,Display Alignment: Right,,
114 ,Display Alignment: Right,,
119 VAR1,VAR2,VAR3,VAR4,VAR5