checkin of 0.3.0
[pspp-builds.git] / tests / mdfy-vars.stat
1 title 'Test MODIFY VARS, RENAME VARIABLES'.
2
3 /* Note that these are not quite in alphabetic order.
4 data list /a b c d e f g h i j k m n o p l q r s t u v w x y z 1-26 (a).
5
6 /* Dummy data that's not actually examined.
7 begin data.
8 ABCDEFGHIJKLMNOPQRSTUVWXYZ
9 NOPQRSTUVWXYZABCDEFGHIJKLM
10 end data.
11
12 /* This should display z y x w s q p n m l k j i h t7 t6 t5 t4 t3 t2 t1.
13 modify vars /reorder=backward alpha/drop o r t u v/rename (a to g=t1 to t7).
14 display var.
15
16 /* This should display z y x w s q p n m l x14 x13 x12 x11 t1 t6 t5 t4 t3
17 /* t2 t7.
18 rename variables (t1=t7)(t7=t1)(h i j k=x11 to x14).
19 display var.
20
21 /* The command below should fail with an error message.
22 rename variables (t1=t2)(t2=t2).
23
24 /* This should display y x w s q p n m l x14 x13 x12 x11 t1 t6 t5 t3 t7.
25 modify vars /reorder=forward positional/keep y to t5 t3 x14 t7.
26 display var.
27
28 /* This should display t7 x11 q s x y. */
29 modify vars /reorder=backward positional/keep x s y x11 t7 q.
30 display var.
31