1 AT_BANNER([GET DATA /TYPE=GNM])
3 AT_SETUP([GET DATA /TYPE=GNM with CELLRANGE])
4 AT_SKIP_IF([test "$GNM_SUPPORT" = no])
5 AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric])
6 AT_DATA([get-data.sps], [dnl
7 GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /READNAMES=off /SHEET=name 'This' /CELLRANGE=range 'g9:i13' .
11 AT_CHECK([pspp -o pspp.csv get-data.sps])
12 AT_CHECK([cat pspp.csv], [0], [dnl
13 Variable,Description,,Position
14 VAR001,Format: F8.2,,1
16 ,Display Alignment: Right,,
20 ,Display Alignment: Left,,
22 VAR003,Format: F8.2,,3
24 ,Display Alignment: Right,,
37 AT_SETUP([GET DATA /TYPE=GNM with CELLRANGE and READNAMES])
38 AT_SKIP_IF([test "$GNM_SUPPORT" = no])
39 AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric])
40 AT_DATA([get-data.sps], [dnl
41 GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /READNAMES=on /SHEET=name 'This' /CELLRANGE=range 'g8:i13' .
45 AT_CHECK([pspp -o pspp.csv get-data.sps])
46 AT_CHECK([cat pspp.csv], [0], [dnl
47 Variable,Description,,Position
50 ,Display Alignment: Right,,
54 ,Display Alignment: Left,,
56 VAR001,Format: F8.2,,3
58 ,Display Alignment: Right,,
71 AT_SETUP([GET DATA /TYPE=GNM without CELLRANGE])
72 AT_SKIP_IF([test "$GNM_SUPPORT" = no])
73 AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric])
74 AT_DATA([get-data.sps], [dnl
75 GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /SHEET=index 3.
79 AT_CHECK([pspp -o pspp.csv get-data.sps])
80 AT_CHECK([cat pspp.csv], [0], [dnl
81 Variable,Description,,Position
84 ,Display Alignment: Left,,
88 ,Display Alignment: Right,,
90 height,Format: F8.2,,3
92 ,Display Alignment: Right,,
104 AT_SETUP([GET DATA /TYPE=GNM with missing data])
105 AT_SKIP_IF([test "$GNM_SUPPORT" = no])
106 AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric])
107 AT_DATA([get-data.sps], [dnl
108 * This sheet has no data in one of its variables
109 GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /READNAMES=on /SHEET=index 5.
113 AT_CHECK([pspp -o pspp.csv get-data.sps])
114 AT_CHECK([cat pspp.csv], [0], [dnl
115 Variable,Description,,Position
118 ,Display Alignment: Right,,
122 ,Display Alignment: Right,,
126 ,Display Alignment: Left,,
130 ,Display Alignment: Right,,
140 AT_SETUP([GET DATA /TYPE=GNM with empty sheet])
141 AT_SKIP_IF([test "$GNM_SUPPORT" = no])
142 AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric])
143 AT_DATA([get-data.sps], [dnl
144 * This sheet is empty
145 GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /SHEET=name 'Empty'.
147 AT_CHECK([pspp -o pspp.csv get-data.sps], [0], [dnl
148 warning: Selected sheet or range of spreadsheet `Book1.gnumeric' is empty.
152 AT_SETUP([GET DATA /TYPE=GNM with nonexistent sheet])
153 AT_SKIP_IF([test "$GNM_SUPPORT" = no])
154 AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric])
155 AT_DATA([get-data.sps], [dnl
156 * This sheet doesnt exist.
157 GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /SHEET=name 'foobarxx'.
159 AT_CHECK([pspp -o pspp.csv get-data.sps], [0], [dnl
160 warning: Selected sheet or range of spreadsheet `Book1.gnumeric' is empty.