AUTORECODE: Use Autotest for test suite.
[pspp-builds.git] / tests / language / stats / autorecode.at
1 AT_BANNER([AUTORECODE procedure])
2
3 AT_SETUP([AUTORECODE numbers and short strings])
4 AT_DATA([autorecode.sps],
5   [data list /X 1-5(a) Y 7.
6 begin data.
7 lasdj 1
8 asdfk 0
9 asdfj 2
10 asdfj 1
11 asdfk 2
12 asdfj 9
13 lajks 9
14 asdfk 0
15 asdfk 1
16 end data.
17
18 autorecode x y into A B/descend.
19
20 list.
21 compute Z=trunc(y/2).
22 autorecode z into W.
23 list.
24 ])
25 AT_CHECK([pspp -O format=csv autorecode.sps], [0],
26   [Table: Reading 1 record from INLINE.
27 Variable,Record,Columns,Format
28 X,1,1-  5,A5
29 Y,1,7-  7,F1.0
30
31 Table: Data List
32 X,Y,A,B
33 lasdj,1,1.00,3.00
34 asdfk,0,3.00,4.00
35 asdfj,2,4.00,2.00
36 asdfj,1,4.00,3.00
37 asdfk,2,3.00,2.00
38 asdfj,9,4.00,1.00
39 lajks,9,2.00,1.00
40 asdfk,0,3.00,4.00
41 asdfk,1,3.00,3.00
42
43 Table: Data List
44 X,Y,A,B,Z,W
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
54 ])
55 AT_CLEANUP