+dnl PSPP - a program for statistical analysis.
+dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl
+dnl This program is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
+dnl
AT_BANNER([AGGREGATE procedure])
dnl CHECK_AGGREGATE(OUTFILE, SORT, MISSING)
dnl
dnl Checks the AGGREGATE procedure with the specified combination of:
dnl
-dnl - OUTFILE: One of "scratch", "active", or "external" according to
+dnl - OUTFILE: One of "dataset", "active", or "external" according to
dnl where AGGREGATE's output should be directed.
dnl
dnl - SORT: Either "presorted" or "unsorted" according to whether
[DATA LIST NOTABLE FILE='aggregate.data' /G N 1-2 S 3(a) W 4.
WEIGHT BY w.
MISSING VALUES n(4) s('4').
+m4_if([$1], [dataset], [DATASET DECLARE aggregate.])
m4_if([$2], [presorted], [SORT CASES BY g.])
AGGREGATE dnl
m4_if([$1], [active], [OUTFILE=*],
[$1], [external], [OUTFILE='aggregate.sys'],
- [outfile=@%:@AGGREGATE]) dnl
+ [outfile=aggregate]) dnl
m4_if([$2], [presorted], [/PRESORTED]) dnl
m4_if([$3], [columnwise], [/MISSING=COLUMNWISE])
/DOCUMENT
/NSUM = sum(n)
/NSUMI = sum.(n).
m4_if([$1], [external], [GET FILE='aggregate.sys'.],
- [$1], [scratch], [GET FILE=@%:@AGGREGATE.])
+ [$1], [dataset], [DATASET ACTIVATE aggregate.])
LIST.
])
AT_CHECK([pspp -O format=csv aggregate.sps], [0], [stdout])
])])
AT_CLEANUP])
-CHECK_AGGREGATE([scratch], [presorted], [itemwise])
-CHECK_AGGREGATE([scratch], [presorted], [columnwise])
-CHECK_AGGREGATE([scratch], [unsorted], [itemwise])
-CHECK_AGGREGATE([scratch], [unsorted], [columnwise])
+CHECK_AGGREGATE([dataset], [presorted], [itemwise])
+CHECK_AGGREGATE([dataset], [presorted], [columnwise])
+CHECK_AGGREGATE([dataset], [unsorted], [itemwise])
+CHECK_AGGREGATE([dataset], [unsorted], [columnwise])
CHECK_AGGREGATE([active], [presorted], [itemwise])
CHECK_AGGREGATE([active], [presorted], [columnwise])
CHECK_AGGREGATE([active], [unsorted], [itemwise])
["dup-variables.sps:24: error: AGGREGATE: Variable name N_BREAK is not unique within the aggregate file dictionary, which contains the aggregate variables and the break variables."
])
-
AT_CLEANUP