From: John Darrington Date: Sat, 13 Aug 2016 05:29:30 +0000 (+0200) Subject: AUTORECODE now optionally accepts / before INTO X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f5db6689698d28d22533342a7f8a02f4f1bb071;p=pspp AUTORECODE now optionally accepts / before INTO Fixes Bug #48762 --- diff --git a/NEWS b/NEWS index 0b87edb31a..883590541e 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,9 @@ Please send PSPP bug reports to bug-gnu-pspp@gnu.org. Changes from 0.10.2 to 0.10.4: - * Updated to Gtk+3.14.5 + * Gtk+3.14.5 or later must now be used when building. + + * The AUTORECODE command now accepts an optional / before INTO. Changes from 0.10.1 to 0.10.2: diff --git a/src/language/stats/autorecode.c b/src/language/stats/autorecode.c index dc357f7c44..d3c5864c22 100644 --- a/src/language/stats/autorecode.c +++ b/src/language/stats/autorecode.c @@ -153,6 +153,7 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds) if (!parse_variables_const (lexer, dict, &src_vars, &n_srcs, PV_NO_DUPLICATE | PV_NO_SCRATCH)) goto error; + lex_match (lexer, T_SLASH); if (!lex_force_match_id (lexer, "INTO")) goto error; lex_match (lexer, T_EQUALS); diff --git a/tests/language/stats/autorecode.at b/tests/language/stats/autorecode.at index 6a8ff8e731..52c56a8582 100644 --- a/tests/language/stats/autorecode.at +++ b/tests/language/stats/autorecode.at @@ -272,3 +272,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