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