1 m4_define([CHECK_ADD_FILES],
2 [AT_SETUP([ADD FILES -- $1 $2 with $3])
18 AT_DATA([b.data], [dnl
27 [AT_DATA([save-a.sps], [dnl
28 DATA LIST NOTABLE FILE='a.data' /a b c 1-3 (A).
31 AT_CHECK([pspp -O format=csv save-a.sps])])
33 [AT_DATA([save-b.sps], [dnl
34 DATA LIST NOTABLE FILE='b.data' /a b c 1-3 (A).
37 AT_CHECK([pspp -O format=csv save-b.sps])])
38 m4_if([$1], [interleave],
39 [m4_pushdef([BY], [[/BY a /FIRST=first /LAST=last]])
40 m4_pushdef([SORT], [[/SORT]])],
42 m4_pushdef([SORT], [])])
43 AT_DATA([add-files.sps], [dnl
44 m4_if([$2], [sav], [], [DATA LIST NOTABLE FILE='a.data' /a b c 1-3 (A).])
45 m4_if([$3], [sav], [], [DATA LIST NOTABLE FILE='b.data' /a b c 1-3 (A).])
47 m4_if([$2], [sav], [FILE='a.sav'], [FILE=*]) /IN=InA SORT
48 m4_if([$3], [sav], [FILE='b.sav'], [FILE=*]) /IN=InB /RENAME c=d
54 AT_CHECK([pspp -O format=csv add-files.sps], [0],
55 [m4_if([$1], [interleave], [dnl
57 a,b,c,d,InA,InB,first,last
103 AT_BANNER([ADD FILES])
105 CHECK_ADD_FILES([interleave], [sav], [sav])
106 CHECK_ADD_FILES([interleave], [sav], [inline])
107 CHECK_ADD_FILES([interleave], [inline], [sav])
108 CHECK_ADD_FILES([concatenate], [sav], [sav])
109 CHECK_ADD_FILES([concatenate], [sav], [inline])
110 CHECK_ADD_FILES([concatenate], [inline], [sav])