X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Flanguage%2Fstats%2Fautorecode.at;h=bd9d59f7c45dfaa2259e7abe15c2e0684b0728c5;hb=2a655e8b3693e78d6be47d51d011de61a7189a3f;hp=8f971aefb7f0fa715d5f5e861e91a12f3628e9a7;hpb=d500232dbfbf76be9e525e3e5cdf59505b0cdf32;p=pspp diff --git a/tests/language/stats/autorecode.at b/tests/language/stats/autorecode.at index 8f971aefb7..bd9d59f7c4 100644 --- a/tests/language/stats/autorecode.at +++ b/tests/language/stats/autorecode.at @@ -140,3 +140,69 @@ x,y,a,b ]) AT_CLEANUP + + + +AT_SETUP([AUTORECODE group - string variables]) +AT_DATA([strings.sps], +[data list notable list /x (a8) y (a16). +begin data. +fred bert +charlie " " +delta echo +" " windows +" " nothing +end data. + + +autorecode x y into a b + /group. + +delete variables x y. + +list. + +]) + +AT_CHECK([pspp -O format=csv strings.sps], [0], +[Table: Data List +a,b +7.00,3.00 +4.00,1.00 +5.00,6.00 +2.00,9.00 +2.00,8.00 +]) + +AT_CLEANUP + + +dnl Tests for a crash which happened when the /GROUP subcommand +dnl appeared with string variables of different widths. +AT_SETUP([AUTORECODE group vs. strings]) +AT_DATA([ar-strings.sps], + [data list notable list /a (a12) b (a6). +begin data. +one nine +two ten +three eleven +four nought +end data. + +autorecode a b into x y + /group. + +list. +]) + +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 +]) + +AT_CLEANUP