AT_BANNER([GET DATA /TYPE=GNM]) AT_SETUP([GET DATA /TYPE=GNM with CELLRANGE]) AT_SKIP_IF([test "$GNM_SUPPORT" = no]) AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric]) AT_DATA([get-data.sps], [dnl GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /READNAMES=off /SHEET=name 'This' /CELLRANGE=range 'g9:i13' . DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,,Position VAR001,Format: F8.2,,1 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, VAR002,Format: A8,,2 ,Measure: Nominal,, ,Display Alignment: Left,, ,Display Width: 8,, VAR003,Format: F8.2,,3 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, Table: Data List VAR001,VAR002,VAR003 .00,fred ,20.00 1.00,11 ,21.00 2.00,twelve ,22.00 3.00,13 ,23.00 4.00,14 ,24.00 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=GNM with CELLRANGE and READNAMES]) AT_SKIP_IF([test "$GNM_SUPPORT" = no]) AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric]) AT_DATA([get-data.sps], [dnl GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /READNAMES=on /SHEET=name 'This' /CELLRANGE=range 'g8:i13' . DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,,Position V1,Format: F8.2,,1 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, V2,Format: A8,,2 ,Measure: Nominal,, ,Display Alignment: Left,, ,Display Width: 8,, VAR001,Format: F8.2,,3 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, Table: Data List V1,V2,VAR001 .00,fred ,20.00 1.00,11 ,21.00 2.00,twelve ,22.00 3.00,13 ,23.00 4.00,14 ,24.00 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=GNM without CELLRANGE]) AT_SKIP_IF([test "$GNM_SUPPORT" = no]) AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric]) AT_DATA([get-data.sps], [dnl GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /SHEET=index 3. DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,,Position name,Format: A8,,1 ,Measure: Nominal,, ,Display Alignment: Left,, ,Display Width: 8,, id,Format: F8.2,,2 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, height,Format: F8.2,,3 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, Table: Data List name,id,height fred ,.00,23.40 bert ,1.00,.56 charlie ,2.00,. @&t@ dick ,3.00,-34.09 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=GNM with missing data]) AT_SKIP_IF([test "$GNM_SUPPORT" = no]) AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric]) AT_DATA([get-data.sps], [dnl * This sheet has no data in one of its variables GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /READNAMES=on /SHEET=index 5. DISPLAY VARIABLES. LIST. ]) AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Variable,Description,,Position vone,Format: F8.2,,1 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, vtwo,Format: F8.2,,2 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, vthree,Format: A8,,3 ,Measure: Nominal,, ,Display Alignment: Left,, ,Display Width: 8,, v4,Format: F8.2,,4 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, Table: Data List vone,vtwo,vthree,v4 1.00,3.00,,5.00 2.00,4.00,,6.00 ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=GNM with empty sheet]) AT_SKIP_IF([test "$GNM_SUPPORT" = no]) AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric]) AT_DATA([get-data.sps], [dnl * This sheet is empty GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /SHEET=name 'Empty'. ]) AT_CHECK([pspp -o pspp.csv get-data.sps], [0], [dnl warning: Selected sheet or range of spreadsheet `Book1.gnumeric' is empty. ]) AT_CLEANUP AT_SETUP([GET DATA /TYPE=GNM with nonexistent sheet]) AT_SKIP_IF([test "$GNM_SUPPORT" = no]) AT_CHECK([gzip -c $top_srcdir/tests/language/data-io/Book1.gnm.unzipped > Book1.gnumeric]) AT_DATA([get-data.sps], [dnl * This sheet doesnt exist. GET DATA /TYPE=gnm /FILE='Book1.gnumeric' /SHEET=name 'foobarxx'. ]) AT_CHECK([pspp -o pspp.csv get-data.sps], [0], [dnl warning: Selected sheet or range of spreadsheet `Book1.gnumeric' is empty. ]) AT_CLEANUP