X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fdata-io%2Flist.at;h=5dd3af42bcff989f0a096aaf19b65ab277c4578f;hb=0200682d517fd4b7cfc4e333378de03bcf74be43;hp=d495ddc51568a22cf2fe394aab547deed8eab79e;hpb=c70c924972443e3ec2713e421815cbf959af2582;p=pspp diff --git a/tests/language/data-io/list.at b/tests/language/data-io/list.at index d495ddc515..5dd3af42bc 100644 --- a/tests/language/data-io/list.at +++ b/tests/language/data-io/list.at @@ -1,16 +1,16 @@ dnl PSPP - a program for statistical analysis. dnl Copyright (C) 2017 Free Software Foundation, Inc. -dnl +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 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 dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl @@ -39,8 +39,8 @@ AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading 1 record from `data.txt'. Variable,Record,Columns,Format -avar,1,1- 5,F5.0 -bvar,1,6- 10,F5.0 +avar,1,1-5,F5.0 +bvar,1,6-10,F5.0 Table: Data List avar,bvar @@ -76,13 +76,14 @@ AT_DATA([list.sps], [dnl DATA LIST FILE='data.txt'/avar 1-5 bvar 6-10. WEIGHT BY bvar. LIST/FORMAT NUMBERED. +LIST/FORMAT NUMBERED/CASES FROM 2 TO 9 BY 2. ]) AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Reading 1 record from `data.txt'. Variable,Record,Columns,Format -avar,1,1- 5,F5.0 -bvar,1,6- 10,F5.0 +avar,1,1-5,F5.0 +bvar,1,6-10,F5.0 Table: Data List Case Number,avar,bvar @@ -97,6 +98,13 @@ Case Number,avar,bvar 9,26,30 10,27,21 11,28,23 + +Table: Data List +Case Number,avar,bvar +2,19,7 +4,21,76 +6,23,58 +8,25,38 ]) AT_CLEANUP @@ -118,8 +126,9 @@ LIST n. ]) AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl -Variable,Value,Label -s,a, +Table: Split Values +Variable,Value +s,a Table: Data List n @@ -127,15 +136,17 @@ n 2.00 3.00 -Variable,Value,Label -s,b, +Table: Split Values +Variable,Value +s,b Table: Data List n 1.00 -Variable,Value,Label -s,c, +Table: Split Values +Variable,Value +s,c Table: Data List n @@ -256,8 +267,8 @@ LIST. AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Print Format,Write Format,Missing Values -foo,1,A2000,A2000, +Name,Position,Print Format,Write Format +foo,1,A2000,A2000 Table: Data List foo @@ -283,3 +294,34 @@ LIST. AT_CHECK([pspp -o pspp.csv list.sps], [1], [ignore]) AT_CLEANUP + +dnl This is an example from doc/tutorial.texi +dnl So if the results of this have to be changed in any way, +dnl make sure to update that file. +AT_SETUP([LIST tutorial example]) +AT_DATA([list.sps], [dnl +data list list /forename (A12) height. +begin data. +Ahmed 188 +Bertram 167 +Catherine 134.231 +David 109.1 +end data + +list /format=numbered. +]) +AT_CHECK([pspp -o pspp.csv -o pspp.txt list.sps]) +AT_CHECK([cat pspp.csv], [0], [dnl +Table: Reading free-form data from INLINE. +Variable,Format +forename,A12 +height,F8.0 + +Table: Data List +Case Number,forename,height +1,Ahmed,188.00 +2,Bertram,167.00 +3,Catherine,134.23 +4,David,109.10 +]) +AT_CLEANUP