Automatically infer variables' measurement level from format and data.
[pspp] / tests / language / stats / autorecode.at
index 42f3cd32c0c9dc5cad19245bc7101562ac760306..f639b078a493dfc2f895e2ee155c7c5ef582b17e 100644 (file)
@@ -142,8 +142,8 @@ list.
 AT_CHECK([pspp -O format=csv autorecode.sps], [0],
   [Table: Reading 1 record from INLINE.
 Variable,Record,Columns,Format
-X,1,1-  5,A5
-Y,1,7-  7,F1.0
+X,1,1-5,A5
+Y,1,7-7,F1.0
 
 Table: Recoding X into A.
 Old Value,New Value,Value Label
@@ -227,8 +227,8 @@ thingummies,6,3
 oojimiflips,7,2
 
 Table: Variables
-Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values
-new,3,tracking my stuff,Scale,Input,8,Right,F1.0,F1.0,
+Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format
+new,3,tracking my stuff,Nominal,Input,8,Right,F1.0,F1.0
 
 Table: Value Labels
 Variable Value,,Label
@@ -454,8 +454,8 @@ list.
 AT_CHECK([pspp -O format=csv autorecode.sps], [0], [dnl
 Table: Reading 1 record from INLINE.
 Variable,Record,Columns,Format
-X,1,1-  5,A5
-Y,1,7-  7,F1.0
+X,1,1-5,A5
+Y,1,7-7,F1.0
 
 Table: Recoding X into A.
 Old Value,New Value,Value Label
@@ -522,3 +522,24 @@ x,y
 8,4
 ])
 AT_CLEANUP
+
+
+AT_SETUP([AUTORECODE with /BLANK without specifier])
+
+AT_DATA([autorecode.sps], [data list notable list /x (a18).
+begin data
+one
+two
+three
+end data.
+
+* /BLANK should be either =MISSING or =VALID
+autorecode x /into y
+ /blank
+
+execute.
+])
+
+AT_CHECK([pspp -O format=csv autorecode.sps], [1], [ignore])
+
+AT_CLEANUP