Automatically infer variables' measurement level from format and data.
[pspp] / tests / language / dictionary / value-labels.at
index 1ddabf972ab671d92b8adb534c2b43ddb25801a3..c09b8ef080ba11e7acbbd9eb8c24586794be419d 100644 (file)
@@ -1,16 +1,16 @@
 dnl PSPP - a program for statistical analysis.
 dnl Copyright (C) 2017 Free Software Foundation, Inc.
-dnl 
+dnl
 dnl This program is free software: you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
 dnl the Free Software Foundation, either version 3 of the License, or
 dnl (at your option) any later version.
-dnl 
+dnl
 dnl This program is distributed in the hope that it will be useful,
 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
-dnl 
+dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 dnl
@@ -27,9 +27,9 @@ DISPLAY DICTIONARY.
 ])
 AT_CHECK([pspp -O format=csv value-labels.sps], [0], [dnl
 Table: Variables
-Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values
-ad,1,,Scale,Input,8,Right,ADATE10,ADATE10,
-dt,2,,Scale,Input,8,Right,DATETIME20.0,DATETIME20.0,
+Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format
+ad,1,Unknown,Input,8,Right,ADATE10,ADATE10
+dt,2,Unknown,Input,8,Right,DATETIME20.0,DATETIME20.0
 
 Table: Value Labels
 Variable Value,,Label
@@ -55,8 +55,8 @@ FREQUENCIES x/STAT=NONE.
 AT_CHECK([pspp -o pspp.csv -o pspp.txt value-labels.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Variables
-Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values
-x,1,,Scale,Input,8,Right,F8.2,F8.2,
+Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format
+x,1,Nominal,Input,8,Right,F8.2,F8.2
 
 Table: Value Labels
 Variable Value,,Label
@@ -94,8 +94,8 @@ FREQUENCIES x/STAT=NONE.
 AT_CHECK([pspp -o pspp.csv -o pspp.txt get.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Variables
-Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values
-x,1,,Scale,Input,8,Right,F8.2,F8.2,
+Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format
+x,1,Nominal,Input,8,Right,F8.2,F8.2
 
 Table: Value Labels
 Variable Value,,Label
@@ -113,16 +113,16 @@ Total,,3,100.0%,,
 ])
 AT_CLEANUP
 
-dnl Tests for a bug which caused VALUE LABELS to 
+dnl Tests for a bug which caused VALUE LABELS to
 dnl crash when given invalid syntax.
 AT_SETUP([VALUE LABELS invalid syntax bug])
 AT_DATA([value-labels.sps], [dnl
 DATA LIST LIST NOTABLE /a * pref * .
 BEGIN DATA.
-    1.00     1.00    
-    1.00     2.00    
-    2.00     1.00    
-    2.00     2.00    
+    1.00     1.00
+    1.00     2.00
+    2.00     1.00
+    2.00     2.00
 END DATA.
 
 VALUE LABELS /var=a 'label for a'.
@@ -137,7 +137,7 @@ AT_SETUP([VALUE LABELS trailing `/' bug])
 AT_DATA([value-labels.sps], [dnl
 DATA LIST LIST NOTABLE /X * .
 BEGIN DATA.
-1 
+1
 2
 3
 4