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
93 ,Display Alignment: Left,,
97 ,Display Alignment: Right,,
101 ,Display Alignment: Right,,
112 AT_SETUP([AUTORECODE group subcommand])
113 AT_DATA([ar-group.sps],
114 [data list notable list /x * y *.
131 AT_CHECK([pspp -O format=csv ar-group.sps], [0],
134 11.00,10.00,2.00,1.00
135 12.00,12.00,3.00,3.00
136 13.00,15.00,4.00,6.00
137 14.00,11.00,5.00,2.00
138 15.00,12.00,6.00,3.00
139 16.00,18.00,7.00,8.00
146 AT_SETUP([AUTORECODE group - string variables])
147 AT_DATA([strings.sps],
148 [data list notable list /x (a8) y (a16).
158 autorecode x y into a b
161 delete variables x y.
167 AT_CHECK([pspp -O format=csv strings.sps], [0],
180 dnl Tests for a crash which happened when the /GROUP subcommand
181 dnl appeared with string variables of different widths.
182 AT_SETUP([AUTORECODE group vs. strings])
183 AT_DATA([ar-strings.sps],
184 [data list notable list /a (a12) b (a6).
192 autorecode a b into x y
198 AT_CHECK([pspp -O format=csv ar-strings.sps], [0],
204 three ,eleven,7.00,1.00
205 four ,nought,2.00,4.00