X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fautorecode.at;h=33a1fd26def954312b6c561e368851819d2b9683;hb=672c9b7e1c60763d279ecc781b7bf939b8bab4b4;hp=6a8ff8e7316c224b478e8fa6ac5eb9c457be42c5;hpb=649c202d57d7d5d8bb87be5b72839cd56ca4ca0b;p=pspp diff --git a/tests/language/stats/autorecode.at b/tests/language/stats/autorecode.at index 6a8ff8e731..33a1fd26de 100644 --- a/tests/language/stats/autorecode.at +++ b/tests/language/stats/autorecode.at @@ -1,3 +1,19 @@ +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 . +dnl AT_BANNER([AUTORECODE procedure]) AT_SETUP([AUTORECODE numbers and short strings]) @@ -79,24 +95,26 @@ display dictionary. AT_CHECK([pspp -O format=csv ar.sps], [0], [Table: Data List s,x,new -widgets ,1.00,4.00 -thingummies ,2.00,3.00 -oojars ,3.00,1.00 -widgets ,4.00,4.00 -oojars ,5.00,1.00 -thingummies ,6.00,3.00 -oojimiflips ,7.00,2.00 - -Variable,Description,Position -s,Format: A16,1 -x,Format: F8.2,2 -new,"Format: F8.2 - -Value,Label -1.00,oojars -2.00,oojimiflips -3.00,thingummies -4.00,widgets",3 +widgets,1.00,4.00 +thingummies,2.00,3.00 +oojars,3.00,1.00 +widgets,4.00,4.00 +oojars,5.00,1.00 +thingummies,6.00,3.00 +oojimiflips,7.00,2.00 + +Table: Variables +Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values +s,1,,Nominal,Input,16,Left,A16,A16, +x,2,,Scale,Input,8,Right,F8.2,F8.2, +new,3,,Scale,Input,8,Right,F8.2,F8.2, + +Table: Value Labels +Variable Value,,Label +new,1.00,oojars +,2.00,oojimiflips +,3.00,thingummies +,4.00,widgets ]) AT_CLEANUP @@ -192,10 +210,10 @@ AT_CHECK([pspp -O format=csv ar-strings.sps], [0], [dnl Table: Data List a,b,x,y -one ,nine ,5.00,3.00 -two ,ten ,8.00,6.00 -three ,eleven,7.00,1.00 -four ,nought,2.00,4.00 +one,nine,5.00,3.00 +two,ten,8.00,6.00 +three,eleven,7.00,1.00 +four,nought,2.00,4.00 ]) AT_CLEANUP @@ -272,3 +290,36 @@ asdfk,0,2.00,. @&t@ asdfk,1,2.00,. @&t@ ]) AT_CLEANUP + + +dnl For compatibility, make sure that /INTO (with leading slash) is accepted +dnl (bug #48762) +AT_SETUP([AUTORECODE with /INTO]) +AT_DATA([autorecode.sps], + [data list list notable /x . +begin data. +1 +8 +-901 +4 +1 +99 +8 +end data. + +autorecode x /into y. + +list. +]) +AT_CHECK([pspp -O format=csv autorecode.sps], [0], +[Table: Data List +x,y +1.00,2.00 +8.00,4.00 +-901.00,1.00 +4.00,3.00 +1.00,2.00 +99.00,5.00 +8.00,4.00 +]) +AT_CLEANUP