Autorecode: Add value labels indicating the source values.
[pspp] / tests / language / stats / autorecode.at
index b4e9d41f95ad628bb0c5e22e2ae99e8e4f71717e..6f112def33c1427f175366e63cf443371c78eb3c 100644 (file)
@@ -53,3 +53,57 @@ asdfk,0,3.00,4.00,.00,1.00
 asdfk,1,3.00,3.00,.00,1.00
 ])
 AT_CLEANUP
+
+
+
+AT_SETUP([AUTORECODE long strings and check the value labels])
+AT_DATA([ar.sps],
+  [data list notable list /s (a16) x *.
+begin data.
+widgets      1
+thingummies  2
+oojars       3
+widgets      4
+oojars       5
+thingummies  6
+oojimiflips  7
+end data.
+
+autorecode s into new.
+
+list.
+
+display dictionary.
+])
+
+AT_CHECK([pspp -O format=csv ar.sps], [0],
+  [Table: Data List
+s,x,new
+widgets         ,1.00,4.00
+thingummies     ,2.00,3.00
+oojars          ,3.00,1.00
+widgets         ,4.00,4.00
+oojars          ,5.00,1.00
+thingummies     ,6.00,3.00
+oojimiflips     ,7.00,2.00
+
+Variable,Description,,Position
+s,Format: A16,,1
+,Measure: Nominal,,
+,Display Alignment: Left,,
+,Display Width: 16,,
+x,Format: F8.2,,2
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+new,Format: F8.2,,3
+,Measure: Scale,,
+,Display Alignment: Right,,
+,Display Width: 8,,
+,1,oojars,
+,2,oojimiflips,
+,3,thingummies,
+,4,widgets,
+])
+
+AT_CLEANUP