1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2020, 2021 Free Software Foundation, Inc.
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
17 AT_BANNER([spreadsheet])
19 m4_define([SPREADSHEET_TEST],
21 AT_KEYWORDS([spreadsheet $4])
22 AT_CHECK([spreadsheet-test $2 $top_srcdir/tests/data/$1.gnumeric], [0], [$3], [ignore])
23 AT_CHECK([spreadsheet-test $2 $top_srcdir/tests/data/$1.ods], [0], [$3], [ignore])
26 SPREADSHEET_TEST([simple], [--sheet=0], [dnl
34 SPREADSHEET_TEST([simple], [--sheet=0 --reverse], [dnl
43 SPREADSHEET_TEST([multisheet], [--sheet=1], [dnl
52 SPREADSHEET_TEST([repeating], [], [dnl
55 two three three three four
56 four four five five five
59 SPREADSHEET_TEST([sparse], [], [dnl
62 the row above starts at D
65 SPREADSHEET_TEST([holey], [], [dnl
70 dnl If this test takes an unreasonably long time, then probably the caching
71 dnl code is not working.
72 dnl On my machine, this test takes about 7 seconds
73 SPREADSHEET_TEST([one-thousand-by-fifty-three], [--refcheck --reverse], [dnl
77 dnl Check that the worksheet metadata is retrieved correctly
78 SPREADSHEET_TEST([multisheet], [--metadata], [dnl
82 SPREADSHEET_TEST([simple], [--metadata], [dnl
88 AT_SETUP([spreadsheet ODS with repeating data])
89 cp "$top_srcdir/tests/data/repeating-2.ods" .
90 AT_DATA([ods-import.sps], [dnl
92 /file="repeating-2.ods"
94 /cellrange=range "a1:j8"
101 dnl Test for bug #61078
102 AT_CHECK([pspp -O format=csv ods-import.sps], [0], [dnl
104 Name,Position,Print Format,Write Format
117 s2,s3,s4,s5,s6,s7,s6_A,s7_A,s8,s9
118 31.00,5.00,1.00,1.00,4.00,5.00,4.00,5.00,5.00,4.00
119 38.00,1.00,.00,2.00,5.00,5.00,4.00,4.00,5.00,4.00
120 24.00,1.00,.00,3.00,5.00,5.00,4.00,4.00,5.00,3.00
121 49.00,5.00,2.00,3.00,4.00,5.00,4.00,5.00,5.00,5.00
122 30.00,1.00,.00,2.00,5.00,5.00,5.00,5.00,5.00,5.00
123 33.00,5.00,2.00,2.00,5.00,5.00,5.00,5.00,5.00,5.00
124 32.00,1.00,23.00,2.00,4.00,5.00,3.00,4.00,4.00,3.00