1 AT_BANNER([AUTORECODE procedure])
3 AT_SETUP([AUTORECODE numbers and short strings])
4 AT_DATA([autorecode.sps],
5 [data list /X 1-5(a) Y 7.
18 autorecode x y into A B/descend.
25 AT_CHECK([pspp -O format=csv autorecode.sps], [0],
26 [Table: Reading 1 record from INLINE.
27 Variable,Record,Columns,Format
45 lasdj,1,1.00,3.00,.00,1.00
46 asdfk,0,3.00,4.00,.00,1.00
47 asdfj,2,4.00,2.00,1.00,2.00
48 asdfj,1,4.00,3.00,.00,1.00
49 asdfk,2,3.00,2.00,1.00,2.00
50 asdfj,9,4.00,1.00,4.00,3.00
51 lajks,9,2.00,1.00,4.00,3.00
52 asdfk,0,3.00,4.00,.00,1.00
53 asdfk,1,3.00,3.00,.00,1.00
59 AT_SETUP([AUTORECODE long strings and check the value labels])
61 [data list notable list /s (a16) x *.
72 autorecode s into new.
79 AT_CHECK([pspp -O format=csv ar.sps], [0],
83 thingummies ,2.00,3.00
87 thingummies ,6.00,3.00
88 oojimiflips ,7.00,2.00
90 Variable,Description,Position
105 AT_SETUP([AUTORECODE group subcommand])
106 AT_DATA([ar-group.sps],
107 [data list notable list /x * y *.
124 AT_CHECK([pspp -O format=csv ar-group.sps], [0],
127 11.00,10.00,2.00,1.00
128 12.00,12.00,3.00,3.00
129 13.00,15.00,4.00,6.00
130 14.00,11.00,5.00,2.00
131 15.00,12.00,6.00,3.00
132 16.00,18.00,7.00,8.00
139 AT_SETUP([AUTORECODE group - string variables])
140 AT_DATA([strings.sps],
141 [data list notable list /x (a8) y (a16).
151 autorecode x y into a b
154 delete variables x y.
160 AT_CHECK([pspp -O format=csv strings.sps], [0],
173 dnl Tests for a crash which happened when the /GROUP subcommand
174 dnl appeared with string variables of different widths.
175 AT_SETUP([AUTORECODE group vs. strings])
176 AT_DATA([ar-strings.sps],
177 [data list notable list /a (a12) b (a6).
185 autorecode a b into x y
191 AT_CHECK([pspp -O format=csv ar-strings.sps], [0],
197 three ,eleven,7.00,1.00
198 four ,nought,2.00,4.00
205 AT_SETUP([AUTORECODE /blank])
207 AT_DATA([auto-blank.sps], [dnl
208 data list notable list /x (a8) y * z (a16).
217 autorecode variables x y z into a b c /blank=missing.
222 AT_CHECK([pspp -O format=csv auto-blank.sps], [0], [dnl
234 dnl AUTORECODE had a use-after-free error when TEMPORARY was in use.
236 AT_SETUP([AUTORECODE with TEMPORARY])
237 AT_DATA([autorecode.sps],
238 [data list /X 1-5(a) Y 7.
253 autorecode x y into A B/descend.
256 AT_CHECK([pspp -O format=csv autorecode.sps], [0],
257 [Table: Reading 1 record from INLINE.
258 Variable,Record,Columns,Format
277 dnl For compatibility, make sure that /INTO (with leading slash) is accepted
279 AT_SETUP([AUTORECODE with /INTO])
280 AT_DATA([autorecode.sps],
281 [data list list notable /x .
292 autorecode x /into y.
296 AT_CHECK([pspp -O format=csv autorecode.sps], [0],