SYSFILE INFO: Get rid of nested tables.
[pspp] / tests / data / sys-file.at
index 6e49b783c4eaa29665cf24373c3c626a743f293a..b6c17b35fa9369fa75265b32bfb0cb4057ff4c36 100644 (file)
@@ -89,23 +89,20 @@ DISPLAY DICTIONARY.
 EOF
     AT_CHECK([pspp -o pspp.csv sysfile.sps])
     AT_CHECK([cat pspp.csv], [0], [dnl
-Variable,Description,Position
-s1,"Format: A9
-Missing Values: ""0       ""
-
-Value,Label
-abc      ,First value label
-abcdefgh ,Second value label
-abcdefghi,Third value label",1
-s2,"Format: A9
-Missing Values: ""12      ""; ""123     ""
-
-Value,Label
-0        ,Fourth value label
-01234567 ,Fifth value label
-012345678,Sixth value label",2
-s3,"Format: A9
-Missing Values: ""1234    ""; ""12345   ""; ""12345678""",3
+Table: Variables
+Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values
+s1,1,,Nominal,Input,9,Left,A9,A9,"""0       """
+s2,2,,Nominal,Input,9,Left,A9,A9,"""12      ""; ""123     """
+s3,3,,Nominal,Input,9,Left,A9,A9,"""1234    ""; ""12345   ""; ""12345678"""
+
+Table: Value Labels
+Variable,Value,Label
+s1,abc      ,First value label
+,abcdefgh ,Second value label
+,abcdefghi,Third value label
+s2,0        ,Fourth value label
+,01234567 ,Fifth value label
+,012345678,Sixth value label
 ])
     AT_CHECK_UNQUOTED([dd if=foo.sav bs=1 count=4; echo], [0], [$magic
 ], [ignore])
@@ -270,11 +267,12 @@ LIST.
 ])
 AT_CHECK([pspp -o pspp.csv get.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
-Variable,Label,Position
-cont,continents of the world,1
-size,sq km,2
-pop,population,3
-count,number of countries,4
+Table: Variables
+Name,Position,Label
+cont,1,continents of the world
+size,2,sq km
+pop,3,population
+count,4,number of countries
 
 Table: Data List
 cont,size,pop,count
@@ -338,15 +336,12 @@ LIST.
 ])
 AT_CHECK([pspp -o pspp.csv sys-file.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
-Variable,Description,Position
-N,"Format: F8.2
-Display Width: 10",1
-A255,"Format: A255
-Display Width: 32",2
-A258,"Format: A258
-Display Width: 32",3
-A2000,"Format: A2000
-Display Width: 32",4
+Table: Variables
+Name,Position,Print Format,Write Format,Missing Values
+N,1,F8.2,F8.2,
+A255,2,A255,A255,
+A258,3,A258,A258,
+A2000,4,A2000,A2000,
 
 Table: Data List
 N,A255,A258,A2000
@@ -364,15 +359,12 @@ LIST.
 ])
 AT_CHECK([pspp -o pspp.csv sys-file.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
-Variable,Description,Position
-vl255,"Format: A255
-Display Width: 26",1
-vl256,"Format: A256
-Display Width: 26",2
-vl1335,"Format: A1335
-Display Width: 26",3
-vl2000,"Format: A2000
-Display Width: 26",4
+Table: Variables
+Name,Position,Print Format,Write Format,Missing Values
+vl255,1,A255,A255,
+vl256,2,A256,A256,
+vl1335,3,A1335,A1335,
+vl2000,4,A2000,A2000,
 
 Table: Data List
 vl255,vl256,vl1335,vl2000
@@ -416,11 +408,12 @@ EXECUTE.
 ])
    AT_CHECK([pspp -o pspp.csv get.sps])
    AT_CHECK([cat pspp.csv], [0], [dnl
-Variable,Description,Position
-a,Format: A10,1
-b,Format: A256,2
-c,Format: A200,3
-d,Format: A32767,4
+Table: Variables
+Name,Position,Print Format,Write Format,Missing Values
+a,1,A10,A10,
+b,2,A256,A256,
+c,3,A200,A200,
+d,4,A32767,A32767,
 ])
    AT_CLEANUP])
 
@@ -462,6 +455,7 @@ GET FILE='foo.sav'.
 DISPLAY FILE LABEL.
 DISPLAY DOCUMENTS.
 DISPLAY DICTIONARY.
+DISPLAY ATTRIBUTES.
 ])
 AT_CHECK([pspp -o pspp.csv get.sps])
 AT_CHECK([[sed 's/(Entered [^)]*)/(Entered <date>)/' pspp.csv]], [0], [dnl
@@ -477,23 +471,20 @@ jalapeño vicuña.
 
 (Entered <date>)
 
-Variable,Description,Position
-àéîöçxyzabc,"Format: F8.2
-
-Value,Label
-1.00,éclair élan
-
-Attribute,Value
-Atatürk,Düsseldorf Gewürztraminer",1
-roué,"Label: Provençal soupçon
-Format: A9
-
-Value,Label
-abcdefghi,sauté précis",2
-croûton,Format: A1000,3
-
-Table: Custom data file attributes.
-Attribute,Value
-Furtwängler,kindergärtner
+Table: Variables
+Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values
+àéîöçxyzabc,1,,Scale,Input,8,Right,F8.2,F8.2,
+roué,2,Provençal soupçon,Nominal,Input,9,Left,A9,A9,
+croûton,3,,Nominal,Input,32,Left,A1000,A1000,
+
+Table: Value Labels
+Variable,Value,Label
+àéîöçxyzabc,1.00,éclair élan
+roué,abcdefghi,sauté précis
+
+Table: Variable and Dataset Attributes
+Variable,Name,Value
+(dataset),Furtwängler,kindergärtner
+àéîöçxyzabc,Atatürk,Düsseldorf Gewürztraminer
 ])
 AT_CLEANUP