From: Ben Pfaff Date: Mon, 21 Dec 2020 04:30:18 +0000 (-0800) Subject: pivot-table: Change the default format to omit empty rows and columns. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0200682d517fd4b7cfc4e333378de03bcf74be43;p=pspp pivot-table: Change the default format to omit empty rows and columns. By making this the default, it doesn't become necessary to make a lot of procedures that yield output change the format to produce reasonable output. This means that the user's settings for the format won't get overridden. This changes a lot of output that had empty columns, in particular anything that used DISPLAY DICTIONARY with a dictionary that had no variable labels or missing values. This commit also updates the expected output to match. An unexpected side effect was that some tables became empty entirely, for example LIST with no rows. This seemed undesirable, so I changed pivot_table_enumerate_axis() so if an axis was entirely empty due to omit_empty, then omit_empty was suppressed for that axis. --- diff --git a/perl-module/t/Pspp.t b/perl-module/t/Pspp.t index 5d0789af9d..05ba24119a 100644 --- a/perl-module/t/Pspp.t +++ b/perl-module/t/Pspp.t @@ -194,9 +194,9 @@ sub run_pspp_syntax_cmp LIST. SYNTAX Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -id,1,,Scale,Input,8,Right,F2.0,F2.0, -name,2,,Nominal,Input,20,Left,A20,A20, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +id,1,Scale,Input,8,Right,F2.0,F2.0 +name,2,Nominal,Input,20,Left,A20,A20 Table: File Label Label,This is the file label diff --git a/src/language/stats/crosstabs.q b/src/language/stats/crosstabs.q index a66ee7798f..8c1fe5ba2f 100644 --- a/src/language/stats/crosstabs.q +++ b/src/language/stats/crosstabs.q @@ -1247,7 +1247,6 @@ create_crosstab_table (struct crosstabs_proc *proc, struct crosstabulation *xt, pivot_value_new_user_text_nocopy (ds_steal_cstr (&title)), "Crosstabulation"); pivot_table_set_weight_format (table, &proc->weight_format); - table->look.omit_empty = true; struct pivot_dimension *statistics = pivot_dimension_create ( table, PIVOT_AXIS_ROW, N_("Statistics")); @@ -1287,7 +1286,6 @@ create_chisq_table (struct crosstabulation *xt) { struct pivot_table *chisq = pivot_table_create (N_("Chi-Square Tests")); pivot_table_set_weight_format (chisq, &xt->weight_format); - chisq->look.omit_empty = true; pivot_dimension_create ( chisq, PIVOT_AXIS_ROW, N_("Statistics"), @@ -1318,7 +1316,6 @@ create_sym_table (struct crosstabulation *xt) { struct pivot_table *sym = pivot_table_create (N_("Symmetric Measures")); pivot_table_set_weight_format (sym, &xt->weight_format); - sym->look.omit_empty = true; pivot_dimension_create ( sym, PIVOT_AXIS_COLUMN, N_("Values"), @@ -1358,7 +1355,6 @@ create_risk_table (struct crosstabulation *xt, { struct pivot_table *risk = pivot_table_create (N_("Risk Estimate")); pivot_table_set_weight_format (risk, &xt->weight_format); - risk->look.omit_empty = true; struct pivot_dimension *values = pivot_dimension_create ( risk, PIVOT_AXIS_COLUMN, N_("Values"), @@ -1405,7 +1401,6 @@ create_direct_table (struct crosstabulation *xt) { struct pivot_table *direct = pivot_table_create (N_("Directional Measures")); pivot_table_set_weight_format (direct, &xt->weight_format); - direct->look.omit_empty = true; pivot_dimension_create ( direct, PIVOT_AXIS_COLUMN, N_("Values"), diff --git a/src/language/stats/examine.c b/src/language/stats/examine.c index 1fe24e132f..409b9a6dd0 100644 --- a/src/language/stats/examine.c +++ b/src/language/stats/examine.c @@ -589,7 +589,6 @@ static void percentiles_report (const struct examine *cmd, int iact_idx) { struct pivot_table *table = pivot_table_create (N_("Percentiles")); - table->look.omit_empty = true; struct pivot_dimension *percentiles = pivot_dimension_create ( table, PIVOT_AXIS_COLUMN, N_("Percentiles")); @@ -667,7 +666,6 @@ static void normality_report (const struct examine *cmd, int iact_idx) { struct pivot_table *table = pivot_table_create (N_("Tests of Normality")); - table->look.omit_empty = true; struct pivot_dimension *test = pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("Shapiro-Wilk"), @@ -733,7 +731,6 @@ static void descriptives_report (const struct examine *cmd, int iact_idx) { struct pivot_table *table = pivot_table_create (N_("Descriptives")); - table->look.omit_empty = true; pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("Aspect"), N_("Statistic"), N_("Std. Error")); @@ -830,7 +827,6 @@ static void extremes_report (const struct examine *cmd, int iact_idx) { struct pivot_table *table = pivot_table_create (N_("Extreme Values")); - table->look.omit_empty = true; struct pivot_dimension *statistics = pivot_dimension_create ( table, PIVOT_AXIS_COLUMN, N_("Statistics")); @@ -919,7 +915,6 @@ summary_report (const struct examine *cmd, int iact_idx) { struct pivot_table *table = pivot_table_create ( N_("Case Processing Summary")); - table->look.omit_empty = true; pivot_table_set_weight_var (table, dict_get_weight (cmd->dict)); pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("Statistics"), diff --git a/src/language/stats/factor.c b/src/language/stats/factor.c index bdfc9ae290..cf67ecd8d4 100644 --- a/src/language/stats/factor.c +++ b/src/language/stats/factor.c @@ -1750,7 +1750,6 @@ show_explained_variance (const struct cmd_factor * factor, struct pivot_table *table = pivot_table_create ( N_("Total Variance Explained")); - table->look.omit_empty = true; pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("Statistics"), N_("Total"), PIVOT_RC_OTHER, diff --git a/src/language/stats/means.c b/src/language/stats/means.c index 27a2457052..bc3157f7e7 100644 --- a/src/language/stats/means.c +++ b/src/language/stats/means.c @@ -793,7 +793,6 @@ means_shipout_multivar (const struct mtable *mt, const struct means *means, } struct pivot_table *pt = pivot_table_create (ds_cstr (&dss)); - pt->look.omit_empty = true; ds_destroy (&dss); struct pivot_dimension *dim_cells = diff --git a/src/language/stats/oneway.c b/src/language/stats/oneway.c index b407ba05e3..2f1f299839 100644 --- a/src/language/stats/oneway.c +++ b/src/language/stats/oneway.c @@ -1366,7 +1366,6 @@ show_comparisons (const struct oneway_spec *cmd, const struct oneway_workspace * _("Multiple Comparisons (%s)"), var_to_string (cmd->vars[v]))), "Multiple Comparisons"); - table->look.omit_empty = true; struct pivot_dimension *statistics = pivot_dimension_create ( table, PIVOT_AXIS_COLUMN, N_("Statistics"), diff --git a/src/language/stats/rank.c b/src/language/stats/rank.c index 857d6f5dff..3d090b2bdc 100644 --- a/src/language/stats/rank.c +++ b/src/language/stats/rank.c @@ -823,7 +823,6 @@ cmd_rank (struct lexer *lexer, struct dataset *ds) { struct pivot_table *table = pivot_table_create ( N_("Variables Created by RANK")); - table->look.omit_empty = true; pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("New Variable"), N_("New Variable"), N_("Function"), diff --git a/src/language/stats/roc.c b/src/language/stats/roc.c index 5f8da6df55..f18964a562 100644 --- a/src/language/stats/roc.c +++ b/src/language/stats/roc.c @@ -1062,7 +1062,6 @@ show_coords (struct roc_state *rs, const struct cmd_roc *roc) { struct pivot_table *table = pivot_table_create ( N_("Coordinates of the Curve")); - table->look.omit_empty = true; pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("Statistics"), N_("Positive if greater than or equal to"), diff --git a/src/output/pivot-table.c b/src/output/pivot-table.c index 272ccc9e34..45704a7a1e 100644 --- a/src/output/pivot-table.c +++ b/src/output/pivot-table.c @@ -200,7 +200,7 @@ pivot_table_look_init (struct pivot_table_look *look) { memset (look, 0, sizeof *look); - look->omit_empty = false; + look->omit_empty = true; look->row_labels_in_corner = true; look->width_ranges[TABLE_HORZ][0] = 36; look->width_ranges[TABLE_HORZ][1] = 72; @@ -1216,6 +1216,14 @@ pivot_table_enumerate_axis (const struct pivot_table *table, memcpy (p, axis_indexes, axis->n_dimensions * sizeof *p); p += axis->n_dimensions; } + if (omit_empty && p == enumeration) + { + PIVOT_AXIS_FOR_EACH (axis_indexes, axis) + { + memcpy (p, axis_indexes, axis->n_dimensions * sizeof *p); + p += axis->n_dimensions; + } + } *p = SIZE_MAX; if (n) *n = (p - enumeration) / axis->n_dimensions; diff --git a/tests/data/pc+-file-reader.at b/tests/data/pc+-file-reader.at index 35d0fcb856..9d4357b146 100644 --- a/tests/data/pc+-file-reader.at +++ b/tests/data/pc+-file-reader.at @@ -222,20 +222,20 @@ Table: File Label Label,PSPP synthetic test file Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -NUM1,1,,Scale,Input,8,Right,F8.0,F8.0, -NUM2,2,,Scale,Input,8,Right,F8.0,F8.0, -NUM3,3,,Scale,Input,8,Right,F8.0,F8.0, -NUM4,4,,Scale,Input,8,Right,F8.0,F8.0, -NUM5,5,,Scale,Input,8,Right,F8.0,F8.0, -STR1,6,,Nominal,Input,1,Left,A1,A1, -STR2,7,,Nominal,Input,2,Left,A2,A2, -STR3,8,,Nominal,Input,3,Left,A3,A3, -STR4,9,,Nominal,Input,4,Left,A4,A4, -STR5,10,,Nominal,Input,5,Left,A5,A5, -STR6,11,,Nominal,Input,6,Left,A6,A6, -STR7,12,,Nominal,Input,7,Left,A7,A7, -STR8,13,,Nominal,Input,8,Left,A8,A8, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +NUM1,1,Scale,Input,8,Right,F8.0,F8.0 +NUM2,2,Scale,Input,8,Right,F8.0,F8.0 +NUM3,3,Scale,Input,8,Right,F8.0,F8.0 +NUM4,4,Scale,Input,8,Right,F8.0,F8.0 +NUM5,5,Scale,Input,8,Right,F8.0,F8.0 +STR1,6,Nominal,Input,1,Left,A1,A1 +STR2,7,Nominal,Input,2,Left,A2,A2 +STR3,8,Nominal,Input,3,Left,A3,A3 +STR4,9,Nominal,Input,4,Left,A4,A4 +STR5,10,Nominal,Input,5,Left,A5,A5 +STR6,11,Nominal,Input,6,Left,A6,A6 +STR7,12,Nominal,Input,7,Left,A7,A7 +STR8,13,Nominal,Input,8,Left,A8,A8 Table: Value Labels Variable Value,,Label @@ -336,12 +336,12 @@ Table: File Label Label,PSPP synthetic test file Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -NUM1,1,,Scale,Input,8,Right,F8.0,F8.0, -NUM2,2,,Scale,Input,8,Right,F8.0,F8.0, -STR4,3,,Nominal,Input,4,Left,A4,A4, -STR8,4,,Nominal,Input,8,Left,A8,A8, -STR15,5,,Nominal,Input,15,Left,A15,A15, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +NUM1,1,Scale,Input,8,Right,F8.0,F8.0 +NUM2,2,Scale,Input,8,Right,F8.0,F8.0 +STR4,3,Nominal,Input,4,Left,A4,A4 +STR8,4,Nominal,Input,8,Left,A8,A8 +STR15,5,Nominal,Input,15,Left,A15,A15 Table: Data List NUM1,NUM2,STR4,STR8,STR15 @@ -412,11 +412,11 @@ Compression,None Encoding,us-ascii Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -NUM1,1,,Scale,Input,8,Right,F8.0,F8.0, -NUM2,2,,Scale,Input,8,Right,F8.0,F8.0, -NUM3,3,,Scale,Input,8,Right,F8.0,F8.0, -NUM4,4,,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +NUM1,1,Scale,Input,8,Right,F8.0,F8.0 +NUM2,2,Scale,Input,8,Right,F8.0,F8.0 +NUM3,3,Scale,Input,8,Right,F8.0,F8.0 +NUM4,4,Scale,Input,8,Right,F8.0,F8.0 ]) AT_CLEANUP @@ -482,11 +482,11 @@ Table: File Label Label,PSPP synthetic test file Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -NUM1,1,,Scale,Input,8,Right,F8.0,F8.0, -NUM2,2,,Scale,Input,8,Right,F8.0,F8.0, -NUM3,3,,Scale,Input,8,Right,F8.0,F8.0, -NUM4,4,,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +NUM1,1,Scale,Input,8,Right,F8.0,F8.0 +NUM2,2,Scale,Input,8,Right,F8.0,F8.0 +NUM3,3,Scale,Input,8,Right,F8.0,F8.0 +NUM4,4,Scale,Input,8,Right,F8.0,F8.0 Table: Data List NUM1,NUM2,NUM3,NUM4 @@ -506,11 +506,11 @@ Compression,None Encoding,us-ascii Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -NUM1,1,,Scale,Input,8,Right,F8.0,F8.0, -NUM2,2,,Scale,Input,8,Right,F8.0,F8.0, -NUM3,3,,Scale,Input,8,Right,F8.0,F8.0, -NUM4,4,,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +NUM1,1,Scale,Input,8,Right,F8.0,F8.0 +NUM2,2,Scale,Input,8,Right,F8.0,F8.0 +NUM3,3,Scale,Input,8,Right,F8.0,F8.0 +NUM4,4,Scale,Input,8,Right,F8.0,F8.0 ]) AT_CLEANUP @@ -1250,12 +1250,12 @@ Table: File Label Label,PSPP synthetic test file Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -NUM1,1,,Scale,Input,8,Right,F8.0,F8.0, -NUM2,2,,Scale,Input,8,Right,F8.0,F8.0, -STR4,3,,Nominal,Input,4,Left,A4,A4, -STR8,4,,Nominal,Input,8,Left,A8,A8, -STR15,5,,Nominal,Input,15,Left,A15,A15, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +NUM1,1,Scale,Input,8,Right,F8.0,F8.0 +NUM2,2,Scale,Input,8,Right,F8.0,F8.0 +STR4,3,Nominal,Input,4,Left,A4,A4 +STR8,4,Nominal,Input,8,Left,A8,A8 +STR15,5,Nominal,Input,15,Left,A15,A15 warning: `pc+-file.sav' near offset 0x308: Possible compressed data corruption: string contains compressed integer (opcode 101). diff --git a/tests/data/por-file.at b/tests/data/por-file.at index b9e45ef4ee..9024f89ba2 100644 --- a/tests/data/por-file.at +++ b/tests/data/por-file.at @@ -105,12 +105,12 @@ LIST. ]) AT_CHECK([pspp -O format=csv import.sps], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -VAR1,1,,Scale,Input,8,Right,F1.0,F1.0, -VAR2,2,,Scale,Input,8,Right,F1.0,F1.0, -VAR3,3,,Scale,Input,8,Right,F1.0,F1.0, -VAR4,4,,Scale,Input,8,Right,F1.0,F1.0, -VAR5,5,,Scale,Input,8,Right,F1.0,F1.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +VAR1,1,Scale,Input,8,Right,F1.0,F1.0 +VAR2,2,Scale,Input,8,Right,F1.0,F1.0 +VAR3,3,Scale,Input,8,Right,F1.0,F1.0 +VAR4,4,Scale,Input,8,Right,F1.0,F1.0 +VAR5,5,Scale,Input,8,Right,F1.0,F1.0 Table: Value Labels Variable Value,,Label @@ -134,7 +134,6 @@ AT_CHECK([pspp -O format=csv sys-file-info.sps | sed '/Encoding/d '], [0], [dnl Table: File Information File,data.por -Label, Variables,5 Cases,Unknown Type,SPSS Portable File @@ -142,12 +141,12 @@ Weight,Not weighted Compression,None Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -VAR1,1,,Scale,Input,8,Right,F1.0,F1.0, -VAR2,2,,Scale,Input,8,Right,F1.0,F1.0, -VAR3,3,,Scale,Input,8,Right,F1.0,F1.0, -VAR4,4,,Scale,Input,8,Right,F1.0,F1.0, -VAR5,5,,Scale,Input,8,Right,F1.0,F1.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +VAR1,1,Scale,Input,8,Right,F1.0,F1.0 +VAR2,2,Scale,Input,8,Right,F1.0,F1.0 +VAR3,3,Scale,Input,8,Right,F1.0,F1.0 +VAR4,4,Scale,Input,8,Right,F1.0,F1.0 +VAR5,5,Scale,Input,8,Right,F1.0,F1.0 Table: Value Labels Variable Value,,Label diff --git a/tests/data/sys-file-reader.at b/tests/data/sys-file-reader.at index 2cdbc33084..dd520feed3 100644 --- a/tests/data/sys-file-reader.at +++ b/tests/data/sys-file-reader.at @@ -221,9 +221,9 @@ LIST. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, -num2,2,Numeric variable 2's label,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format +num1,1,,Scale,Input,8,Right,F8.0,F8.0 +num2,2,Numeric variable 2's label,Scale,Input,8,Right,F8.0,F8.0 Table: Data List num1,num2 @@ -275,9 +275,9 @@ LIST. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, -num2,2,Numeric variable 2's label,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format +num1,1,,Scale,Input,8,Right,F8.0,F8.0 +num2,2,Numeric variable 2's label,Scale,Input,8,Right,F8.0,F8.0 Table: Data List num1,num2 @@ -408,24 +408,24 @@ DISPLAY DICTIONARY. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, -num2,2,,Scale,Input,8,Right,F8.0,F8.0, -num3,3,,Scale,Input,8,Right,F8.0,F8.0, -num4,4,,Scale,Input,8,Right,F8.0,F8.0, -num5,5,,Scale,Input,8,Right,F8.0,F8.0, -str1,6,,Nominal,Input,1,Left,A1,A1, -str2,7,,Nominal,Input,2,Left,A2,A2, -str3,8,,Nominal,Input,3,Left,A3,A3, -str4,9,,Nominal,Input,4,Left,A4,A4, -str5,10,,Nominal,Input,4,Left,A4,A4, -str6,11,,Nominal,Input,6,Left,A6,A6, -str7,12,,Nominal,Input,7,Left,A7,A7, -str8,13,,Nominal,Input,8,Left,A8,A8, -str9ж,14,,Nominal,Input,9,Left,A9,A9, -str12,15,,Nominal,Input,12,Left,A12,A12, -str16,16,,Nominal,Input,16,Left,A16,A16, -str17,17,,Nominal,Input,17,Left,A17,A17, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +num1,1,Scale,Input,8,Right,F8.0,F8.0 +num2,2,Scale,Input,8,Right,F8.0,F8.0 +num3,3,Scale,Input,8,Right,F8.0,F8.0 +num4,4,Scale,Input,8,Right,F8.0,F8.0 +num5,5,Scale,Input,8,Right,F8.0,F8.0 +str1,6,Nominal,Input,1,Left,A1,A1 +str2,7,Nominal,Input,2,Left,A2,A2 +str3,8,Nominal,Input,3,Left,A3,A3 +str4,9,Nominal,Input,4,Left,A4,A4 +str5,10,Nominal,Input,4,Left,A4,A4 +str6,11,Nominal,Input,6,Left,A6,A6 +str7,12,Nominal,Input,7,Left,A7,A7 +str8,13,Nominal,Input,8,Left,A8,A8 +str9ж,14,Nominal,Input,9,Left,A9,A9 +str12,15,Nominal,Input,12,Left,A12,A12 +str16,16,Nominal,Input,16,Left,A16,A16 +str17,17,Nominal,Input,17,Left,A17,A17 Table: Value Labels Variable Value,,Label @@ -784,19 +784,19 @@ DISPLAY DICTIONARY. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -a,1,,Nominal,Input,8,Left,F8.0,F8.0, -b,2,,Ordinal,Input,8,Left,F8.0,F8.0, -c,3,,Scale,Input,8,Left,F8.0,F8.0, -d,4,,Nominal,Input,8,Right,F8.0,F8.0, -h,5,,Ordinal,Input,3,Right,A3,A3, -i,6,,Scale,Input,3,Right,A3,A3, -j,7,,Nominal,Input,3,Center,A3,A3, -k,8,,Ordinal,Input,3,Center,A3,A3, -l,9,,Scale,Input,9,Center,A9,A9, -m,10,,Nominal,Input,10,Left,A10,A10, -n,11,,Nominal,Input,17,Right,A17,A17, -o,12,,Nominal,Input,25,Center,A25,A25, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +a,1,Nominal,Input,8,Left,F8.0,F8.0 +b,2,Ordinal,Input,8,Left,F8.0,F8.0 +c,3,Scale,Input,8,Left,F8.0,F8.0 +d,4,Nominal,Input,8,Right,F8.0,F8.0 +h,5,Ordinal,Input,3,Right,A3,A3 +i,6,Scale,Input,3,Right,A3,A3 +j,7,Nominal,Input,3,Center,A3,A3 +k,8,Ordinal,Input,3,Center,A3,A3 +l,9,Scale,Input,9,Center,A9,A9 +m,10,Nominal,Input,10,Left,A10,A10 +n,11,Nominal,Input,17,Right,A17,A17 +o,12,Nominal,Input,25,Center,A25,A25 ]) done AT_CLEANUP @@ -867,19 +867,19 @@ DISPLAY DICTIONARY. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -a,1,,Nominal,Input,1,Left,F8.0,F8.0, -b,2,,Ordinal,Input,2,Left,F8.0,F8.0, -c,3,,Scale,Input,3,Left,F8.0,F8.0, -d,4,,Nominal,Input,4,Right,F8.0,F8.0, -h,5,,Ordinal,Input,5,Right,A3,A3, -i,6,,Scale,Input,6,Right,A3,A3, -j,7,,Nominal,Input,7,Center,A3,A3, -k,8,,Ordinal,Input,8,Center,A3,A3, -l,9,,Scale,Input,9,Center,A9,A9, -m,10,,Nominal,Input,10,Left,A10,A10, -n,11,,Nominal,Input,11,Right,A17,A17, -o,12,,Nominal,Input,12,Center,A25,A25, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +a,1,Nominal,Input,1,Left,F8.0,F8.0 +b,2,Ordinal,Input,2,Left,F8.0,F8.0 +c,3,Scale,Input,3,Left,F8.0,F8.0 +d,4,Nominal,Input,4,Right,F8.0,F8.0 +h,5,Ordinal,Input,5,Right,A3,A3 +i,6,Scale,Input,6,Right,A3,A3 +j,7,Nominal,Input,7,Center,A3,A3 +k,8,Ordinal,Input,8,Center,A3,A3 +l,9,Scale,Input,9,Center,A9,A9 +m,10,Nominal,Input,10,Left,A10,A10 +n,11,Nominal,Input,11,Right,A17,A17 +o,12,Nominal,Input,12,Center,A25,A25 ]) done AT_CLEANUP @@ -939,14 +939,14 @@ DISPLAY DICTIONARY. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -LongVariableName1,1,,Scale,Input,8,Right,F8.0,F8.0, -LongVariableName2,2,,Scale,Input,8,Right,F8.0,F8.0, -LongVariableName3,3,,Scale,Input,8,Right,F8.0,F8.0, -LongVariableName4,4,,Scale,Input,8,Right,F8.0,F8.0, -Coördinate_X,5,,Scale,Input,8,Right,F8.0,F8.0, -Coördinate_Y,6,,Scale,Input,8,Right,F8.0,F8.0, -Coördinate_Z,7,,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +LongVariableName1,1,Scale,Input,8,Right,F8.0,F8.0 +LongVariableName2,2,Scale,Input,8,Right,F8.0,F8.0 +LongVariableName3,3,Scale,Input,8,Right,F8.0,F8.0 +LongVariableName4,4,Scale,Input,8,Right,F8.0,F8.0 +Coördinate_X,5,Scale,Input,8,Right,F8.0,F8.0 +Coördinate_Y,6,Scale,Input,8,Right,F8.0,F8.0 +Coördinate_Z,7,Scale,Input,8,Right,F8.0,F8.0 ]) done AT_CLEANUP @@ -1009,9 +1009,9 @@ LIST. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -séq256,1,,Nominal,Input,32,Left,A256,A256, -str600,2,,Nominal,Input,32,Left,A600,A600, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +séq256,1,Nominal,Input,32,Left,A256,A256 +str600,2,Nominal,Input,32,Left,A600,A600 Table: Data List séq256,str600 @@ -1104,10 +1104,10 @@ DISPLAY DICTIONARY. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [[Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -FirstVariable,1,,Scale,Output,8,Right,F8.0,F8.0, -SécondVariable,2,,Scale,Input,8,Right,F8.0,F8.0, -ThirdVariable,3,,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +FirstVariable,1,Scale,Output,8,Right,F8.0,F8.0 +SécondVariable,2,Scale,Input,8,Right,F8.0,F8.0 +ThirdVariable,3,Scale,Input,8,Right,F8.0,F8.0 ]]) done AT_CLEANUP @@ -1168,14 +1168,14 @@ warning: `sys-file.sav': Invalid role for variable x. warning: `sys-file.sav': Invalid role for variable x. Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -i,1,,Scale,Input,8,Right,F8.0,F8.0, -o,2,,Scale,Output,8,Right,F8.0,F8.0, -b,3,,Scale,Both,8,Right,F8.0,F8.0, -n,4,,Scale,None,8,Right,F8.0,F8.0, -p,5,,Scale,Partition,8,Right,F8.0,F8.0, -s,6,,Scale,Split,8,Right,F8.0,F8.0, -x,7,,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +i,1,Scale,Input,8,Right,F8.0,F8.0 +o,2,Scale,Output,8,Right,F8.0,F8.0 +b,3,Scale,Both,8,Right,F8.0,F8.0 +n,4,Scale,None,8,Right,F8.0,F8.0 +p,5,Scale,Partition,8,Right,F8.0,F8.0 +s,6,Scale,Split,8,Right,F8.0,F8.0 +x,7,Scale,Input,8,Right,F8.0,F8.0 ]) done AT_CLEANUP @@ -1227,12 +1227,12 @@ LIST. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, -num2,2,,Scale,Input,8,Right,F8.0,F8.0, -str4,3,,Nominal,Input,4,Left,A4,A4, -str8,4,,Nominal,Input,8,Left,A8,A8, -str15,5,,Nominal,Input,15,Left,A15,A15, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +num1,1,Scale,Input,8,Right,F8.0,F8.0 +num2,2,Scale,Input,8,Right,F8.0,F8.0 +str4,3,Nominal,Input,4,Left,A4,A4 +str8,4,Nominal,Input,8,Left,A8,A8 +str15,5,Nominal,Input,15,Left,A15,A15 Table: Data List num1,num2,str4,str8,str15 @@ -1290,12 +1290,12 @@ LIST. AT_CHECK([pspp -o pspp.csv sys-file.sps], [0]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, -num2,2,,Scale,Input,8,Right,F8.0,F8.0, -str4,3,,Nominal,Input,4,Left,A4,A4, -str8,4,,Nominal,Input,8,Left,A8,A8, -str15,5,,Nominal,Input,15,Left,A15,A15, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +num1,1,Scale,Input,8,Right,F8.0,F8.0 +num2,2,Scale,Input,8,Right,F8.0,F8.0 +str4,3,Nominal,Input,4,Left,A4,A4 +str8,4,Nominal,Input,8,Left,A8,A8 +str15,5,Nominal,Input,15,Left,A15,A15 Table: Data List num1,num2,str4,str8,str15 @@ -1357,12 +1357,12 @@ LIST. "warning: `sys-file.sav' near offset 0x54: Compression bias is not the usual value of 100, or system file uses unrecognized floating-point format." Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, -num2,2,,Scale,Input,8,Right,F8.0,F8.0, -str4,3,,Nominal,Input,4,Left,A4,A4, -str8,4,,Nominal,Input,8,Left,A8,A8, -str15,5,,Nominal,Input,15,Left,A15,A15, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +num1,1,Scale,Input,8,Right,F8.0,F8.0 +num2,2,Scale,Input,8,Right,F8.0,F8.0 +str4,3,Nominal,Input,4,Left,A4,A4 +str8,4,Nominal,Input,8,Left,A8,A8 +str15,5,Nominal,Input,15,Left,A15,A15 Table: Data List num1,num2,str4,str8,str15 @@ -1455,12 +1455,12 @@ LIST. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, -num2,2,,Scale,Input,8,Right,F8.0,F8.0, -str4,3,,Nominal,Input,4,Left,A4,A4, -str8,4,,Nominal,Input,8,Left,A8,A8, -str15,5,,Nominal,Input,15,Left,A15,A15, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +num1,1,Scale,Input,8,Right,F8.0,F8.0 +num2,2,Scale,Input,8,Right,F8.0,F8.0 +str4,3,Nominal,Input,4,Left,A4,A4 +str8,4,Nominal,Input,8,Left,A8,A8 +str15,5,Nominal,Input,15,Left,A15,A15 Table: Data List num1,num2,str4,str8,str15 @@ -1724,9 +1724,9 @@ DISPLAY DICTIONARY. [warning: `sys-file.sav' near offset 0xd4: Renaming variable with duplicate name `VAR1' to `VAR001'. Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -var1,1,,Scale,Input,8,Right,F8.0,F8.0, -var001,2,,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +var1,1,Scale,Input,8,Right,F8.0,F8.0 +var001,2,Scale,Input,8,Right,F8.0,F8.0 ]) done AT_CLEANUP @@ -1965,11 +1965,11 @@ warning: `sys-file.sav' near offset 0x257: Ignoring long string missing value re "warning: `sys-file.sav' near offset 0x270: Ignoring long string missing value 0 for variable str3, with width 11, that has bad value width 12." Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, -str1,2,,Nominal,Input,9,Left,A9,A9, -str2,3,,Nominal,Input,10,Left,A10,A10,"""abcdefgh""; ""ijklmnop""; ""qrstuvwx""" -str3,4,,Nominal,Input,11,Left,A11,A11, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values +num1,1,Scale,Input,8,Right,F8.0,F8.0, +str1,2,Nominal,Input,9,Left,A9,A9, +str2,3,Nominal,Input,10,Left,A10,A10,"""abcdefgh""; ""ijklmnop""; ""qrstuvwx""" +str3,4,Nominal,Input,11,Left,A11,A11, ]) done AT_CLEANUP @@ -2002,9 +2002,9 @@ DISPLAY DICTIONARY. [warning: `sys-file.sav' near offset 0x4c: Ignoring string variable `STR1' set as weighting variable. Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, -str1,2,,Nominal,Input,4,Left,A4,A4, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +num1,1,Scale,Input,8,Right,F8.0,F8.0 +str1,2,Nominal,Input,4,Left,A4,A4 ]) done AT_CLEANUP @@ -2247,8 +2247,8 @@ DISPLAY DICTIONARY. warning: \`sys-file.sav' near offset 0xd8: Integer format indicated by system file (3) differs from expected ($[2]). Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -num1,1,,Scale,Input,8,Right,F8.0,F8.0, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +num1,1,Scale,Input,8,Right,F8.0,F8.0 ]) done AT_CLEANUP diff --git a/tests/data/sys-file.at b/tests/data/sys-file.at index 4c02e1c853..86487173a0 100644 --- a/tests/data/sys-file.at +++ b/tests/data/sys-file.at @@ -90,10 +90,10 @@ EOF AT_CHECK([pspp -o pspp.csv sysfile.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 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""" +Name,Position,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 @@ -337,11 +337,11 @@ LIST. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 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, +Name,Position,Print Format,Write Format +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 @@ -360,11 +360,11 @@ LIST. AT_CHECK([pspp -o pspp.csv sys-file.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 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, +Name,Position,Print Format,Write Format +vl255,1,A255,A255 +vl256,2,A256,A256 +vl1335,3,A1335,A1335 +vl2000,4,A2000,A2000 Table: Data List vl255,vl256,vl1335,vl2000 @@ -409,11 +409,11 @@ EXECUTE. AT_CHECK([pspp -o pspp.csv get.sps]) AT_CHECK([cat pspp.csv], [0], [dnl 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, +Name,Position,Print Format,Write Format +a,1,A10,A10 +b,2,A256,A256 +c,3,A200,A200 +d,4,A32767,A32767 ]) AT_CLEANUP]) @@ -469,10 +469,10 @@ jalapeño vicuña. (Entered )" 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, +Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format +àéîöç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 diff --git a/tests/language/data-io/get-data-psql.at b/tests/language/data-io/get-data-psql.at index 31682ff060..6e5b1a0a26 100644 --- a/tests/language/data-io/get-data-psql.at +++ b/tests/language/data-io/get-data-psql.at @@ -163,29 +163,29 @@ EOF AT_CHECK([pspp -o pspp.csv ordinary-query.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -bool,1,,Scale,Input,8,Right,F8.2,F8.2, -bytea,2,,Nominal,Input,1,Left,AHEX2,AHEX2, -char,3,,Nominal,Input,8,Left,A8,A8, -int8,4,,Scale,Input,8,Right,F8.2,F8.2, -int2,5,,Scale,Input,8,Right,F8.2,F8.2, -int4,6,,Scale,Input,8,Right,F8.2,F8.2, -numeric,7,,Scale,Input,8,Right,E40.6,E40.6, -text,8,,Nominal,Input,16,Left,A16,A16, -oid,9,,Scale,Input,8,Right,F8.2,F8.2, -float4,10,,Scale,Input,8,Right,F8.2,F8.2, -float8,11,,Scale,Input,8,Right,F8.2,F8.2, -money,12,,Scale,Input,8,Right,DOLLAR8.2,DOLLAR8.2, -pbchar,13,,Nominal,Input,8,Left,A8,A8, -varchar,14,,Nominal,Input,8,Left,A8,A8, -date,15,,Scale,Input,8,Right,DATE11,DATE11, -time,16,,Scale,Input,8,Right,TIME11.0,TIME11.0, -timestamp,17,,Scale,Input,8,Right,DATETIME22.0,DATETIME22.0, -timestamptz,18,,Scale,Input,8,Right,DATETIME22.0,DATETIME22.0, -interval,19,,Scale,Input,8,Right,DTIME13.0,DTIME13.0, -interval_months,20,,Scale,Input,8,Right,F3.0,F3.0, -timetz,21,,Scale,Input,8,Right,TIME11.0,TIME11.0, -timetz_zone,22,,Scale,Input,8,Right,F8.2,F8.2, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +bool,1,Scale,Input,8,Right,F8.2,F8.2 +bytea,2,Nominal,Input,1,Left,AHEX2,AHEX2 +char,3,Nominal,Input,8,Left,A8,A8 +int8,4,Scale,Input,8,Right,F8.2,F8.2 +int2,5,Scale,Input,8,Right,F8.2,F8.2 +int4,6,Scale,Input,8,Right,F8.2,F8.2 +numeric,7,Scale,Input,8,Right,E40.6,E40.6 +text,8,Nominal,Input,16,Left,A16,A16 +oid,9,Scale,Input,8,Right,F8.2,F8.2 +float4,10,Scale,Input,8,Right,F8.2,F8.2 +float8,11,Scale,Input,8,Right,F8.2,F8.2 +money,12,Scale,Input,8,Right,DOLLAR8.2,DOLLAR8.2 +pbchar,13,Nominal,Input,8,Left,A8,A8 +varchar,14,Nominal,Input,8,Left,A8,A8 +date,15,Scale,Input,8,Right,DATE11,DATE11 +time,16,Scale,Input,8,Right,TIME11.0,TIME11.0 +timestamp,17,Scale,Input,8,Right,DATETIME22.0,DATETIME22.0 +timestamptz,18,Scale,Input,8,Right,DATETIME22.0,DATETIME22.0 +interval,19,Scale,Input,8,Right,DTIME13.0,DTIME13.0 +interval_months,20,Scale,Input,8,Right,F3.0,F3.0 +timetz,21,Scale,Input,8,Right,TIME11.0,TIME11.0 +timetz_zone,22,Scale,Input,8,Right,F8.2,F8.2 Table: Data List bool,bytea,char,int8,int2,int4,numeric,text,oid,float4,float8,money,pbchar,varchar,date,time,timestamp,timestamptz,interval,interval_months,timetz,timetz_zone @@ -209,10 +209,10 @@ EOF AT_CHECK([pspp -o pspp.csv empty-result.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -a,1,,Scale,Input,8,Right,F8.2,F8.2, -b,2,,Scale,Input,8,Right,DATE11,DATE11, -c,3,,Scale,Input,8,Right,E40.2,E40.2, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +a,1,Scale,Input,8,Right,F8.2,F8.2 +b,2,Scale,Input,8,Right,DATE11,DATE11 +c,3,Scale,Input,8,Right,E40.2,E40.2 ]) dnl Test query with large result set. diff --git a/tests/language/data-io/get-data-spreadsheet.at b/tests/language/data-io/get-data-spreadsheet.at index dc812fd8fa..54486f02f0 100644 --- a/tests/language/data-io/get-data-spreadsheet.at +++ b/tests/language/data-io/get-data-spreadsheet.at @@ -38,10 +38,10 @@ LIST. AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Print Format,Write Format,Missing Values -VAR001,1,F8.2,F8.2, -VAR002,2,A8,A8, -VAR003,3,F8.2,F8.2, +Name,Position,Print Format,Write Format +VAR001,1,F8.2,F8.2 +VAR002,2,A8,A8 +VAR003,3,F8.2,F8.2 Table: Data List VAR001,VAR002,VAR003 @@ -63,10 +63,10 @@ LIST. AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Print Format,Write Format,Missing Values -V1,1,F8.2,F8.2, -V2,2,A8,A8, -VAR001,3,F8.2,F8.2, +Name,Position,Print Format,Write Format +V1,1,F8.2,F8.2 +V2,2,A8,A8 +VAR001,3,F8.2,F8.2 Table: Data List V1,V2,VAR001 @@ -87,10 +87,10 @@ LIST. ]) AT_CHECK([pspp -O format=csv get-data.sps], [0], [dnl Table: Variables -Name,Position,Print Format,Write Format,Missing Values -name,1,A8,A8, -id,2,F8.2,F8.2, -height,3,F8.2,F8.2, +Name,Position,Print Format,Write Format +name,1,A8,A8 +id,2,F8.2,F8.2 +height,3,F8.2,F8.2 warning: Cannot convert the value in the spreadsheet cell C4 to format (F8.2): Field contents are not numeric. @@ -114,11 +114,11 @@ LIST. AT_CHECK([pspp -o pspp.csv get-data.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Print Format,Write Format,Missing Values -vone,1,F8.2,F8.2, -vtwo,2,F8.2,F8.2, -vthree,3,A8,A8, -v4,4,F8.2,F8.2, +Name,Position,Print Format,Write Format +vone,1,F8.2,F8.2 +vtwo,2,F8.2,F8.2 +vthree,3,A8,A8 +v4,4,F8.2,F8.2 Table: Data List vone,vtwo,vthree,v4 @@ -410,14 +410,14 @@ LIST. AT_CHECK([pspp -O format=csv readnames.sps], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -freda,1,,Scale,Input,8,Right,F8.2,F8.2, -fred,2,,Scale,Input,8,Right,F8.2,F8.2, -fred_A,3,,Scale,Input,8,Right,F8.2,F8.2, -fred_B,4,,Scale,Input,8,Right,F8.2,F8.2, -fred_C,5,,Scale,Input,8,Right,F8.2,F8.2, -fred_D,6,,Scale,Input,8,Right,F8.2,F8.2, -fred_E,7,,Scale,Input,8,Right,F8.2,F8.2, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +freda,1,Scale,Input,8,Right,F8.2,F8.2 +fred,2,Scale,Input,8,Right,F8.2,F8.2 +fred_A,3,Scale,Input,8,Right,F8.2,F8.2 +fred_B,4,Scale,Input,8,Right,F8.2,F8.2 +fred_C,5,Scale,Input,8,Right,F8.2,F8.2 +fred_D,6,Scale,Input,8,Right,F8.2,F8.2 +fred_E,7,Scale,Input,8,Right,F8.2,F8.2 Table: Data List freda,fred,fred_A,fred_B,fred_C,fred_D,fred_E diff --git a/tests/language/data-io/list.at b/tests/language/data-io/list.at index 0eb7c8c9c5..5dd3af42bc 100644 --- a/tests/language/data-io/list.at +++ b/tests/language/data-io/list.at @@ -267,8 +267,8 @@ LIST. AT_CHECK([pspp -o pspp.csv list.sps]) AT_CHECK([cat pspp.csv], [0], [dnl Table: Variables -Name,Position,Print Format,Write Format,Missing Values -foo,1,A2000,A2000, +Name,Position,Print Format,Write Format +foo,1,A2000,A2000 Table: Data List foo diff --git a/tests/language/data-io/matrix-data.at b/tests/language/data-io/matrix-data.at index 8f503f62f2..c949617cf9 100644 --- a/tests/language/data-io/matrix-data.at +++ b/tests/language/data-io/matrix-data.at @@ -233,14 +233,14 @@ list. AT_CHECK([pspp -O format=csv matrix-data.pspp], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -s1,1,,Scale,Input,8,Right,F4.0,F4.0, -s2,2,,Scale,Input,8,Right,F4.0,F4.0, -ROWTYPE_,3,,Nominal,Input,8,Left,A8,A8, -VARNAME_,4,,Nominal,Input,8,Left,A8,A8, -var01,5,,Scale,Input,8,Right,F10.4,F10.4, -var02,6,,Scale,Input,8,Right,F10.4,F10.4, -var03,7,,Scale,Input,8,Right,F10.4,F10.4, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +s1,1,Scale,Input,8,Right,F4.0,F4.0 +s2,2,Scale,Input,8,Right,F4.0,F4.0 +ROWTYPE_,3,Nominal,Input,8,Left,A8,A8 +VARNAME_,4,Nominal,Input,8,Left,A8,A8 +var01,5,Scale,Input,8,Right,F10.4,F10.4 +var02,6,Scale,Input,8,Right,F10.4,F10.4 +var03,7,Scale,Input,8,Right,F10.4,F10.4 Table: Data List s1,s2,ROWTYPE_,VARNAME_,var01,var02,var03 diff --git a/tests/language/dictionary/apply.at b/tests/language/dictionary/apply.at index adfff8da9d..97f622fa6b 100644 --- a/tests/language/dictionary/apply.at +++ b/tests/language/dictionary/apply.at @@ -35,16 +35,16 @@ display dictionary. AT_CHECK([pspp -O format=csv apply-dict.sps], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -foo,1,,Scale,Input,8,Right,F8.2,F8.2, -bar,2,,Scale,Input,8,Right,F8.2,F8.2, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +foo,1,Scale,Input,8,Right,F8.2,F8.2 +bar,2,Scale,Input,8,Right,F8.2,F8.2 "apply-dict.sps:12: warning: APPLY DICTIONARY: Variable bar is numeric in target file, but string in source file." Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -foo,1,This is a label,Scale,Input,8,Right,TIME22.0,TIME22.0, -bar,2,,Scale,Input,8,Right,F8.2,F8.2, +Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format +foo,1,This is a label,Scale,Input,8,Right,TIME22.0,TIME22.0 +bar,2,,Scale,Input,8,Right,F8.2,F8.2 ]) AT_CLEANUP diff --git a/tests/language/dictionary/formats.at b/tests/language/dictionary/formats.at index 41278e4f74..b53f114b85 100644 --- a/tests/language/dictionary/formats.at +++ b/tests/language/dictionary/formats.at @@ -37,31 +37,31 @@ y,A2 z,A3 Table: Variables -Name,Position,Print Format,Write Format,Missing Values -a,1,F8.2,F8.2, -b,2,F8.2,F8.2, -c,3,F8.2,F8.2, -x,4,A1,A1, -y,5,A2,A2, -z,6,A3,A3, +Name,Position,Print Format,Write Format +a,1,F8.2,F8.2 +b,2,F8.2,F8.2 +c,3,F8.2,F8.2 +x,4,A1,A1 +y,5,A2,A2 +z,6,A3,A3 Table: Variables -Name,Position,Print Format,Write Format,Missing Values -a,1,COMMA10.0,COMMA10.0, -b,2,N4.0,N4.0, -c,3,F8.2,F8.2, -x,4,A1,A1, -y,5,A2,A2, -z,6,A3,A3, +Name,Position,Print Format,Write Format +a,1,COMMA10.0,COMMA10.0 +b,2,N4.0,N4.0 +c,3,F8.2,F8.2 +x,4,A1,A1 +y,5,A2,A2 +z,6,A3,A3 Table: Variables -Name,Position,Print Format,Write Format,Missing Values -a,1,COMMA10.0,COMMA10.0, -b,2,N4.0,N4.0, -c,3,E8.1,E8.1, -x,4,A1,A1, -y,5,AHEX4,AHEX4, -z,6,A3,A3, +Name,Position,Print Format,Write Format +a,1,COMMA10.0,COMMA10.0 +b,2,N4.0,N4.0 +c,3,E8.1,E8.1 +x,4,A1,A1 +y,5,AHEX4,AHEX4 +z,6,A3,A3 ]) AT_CLEANUP diff --git a/tests/language/dictionary/missing-values.at b/tests/language/dictionary/missing-values.at index 76b84fad47..fd74838591 100644 --- a/tests/language/dictionary/missing-values.at +++ b/tests/language/dictionary/missing-values.at @@ -75,6 +75,7 @@ DISPLAY DICTIONARY str1 str2 longstr. * May mix variable types when clearing missing values. MISSING VALUES ALL (). +MISSING VALUES num1 (1). DISPLAY DICTIONARY ]) AT_CHECK([pspp -o pspp.csv missing-values.sps]) @@ -138,7 +139,7 @@ longstr: """abc ""; ""def """ str1: @&t@ str2: @&t@ date1: @&t@ -num1: @&t@ +num1: 1 longstr: @&t@ ]) AT_CLEANUP diff --git a/tests/language/dictionary/sys-file-info.at b/tests/language/dictionary/sys-file-info.at index 5986e9e01a..6b80f1e5be 100644 --- a/tests/language/dictionary/sys-file-info.at +++ b/tests/language/dictionary/sys-file-info.at @@ -45,7 +45,6 @@ name,A10 Table: File Information File,pro.sav -Label, Variables,2 Cases,3 Type,SPSS System File @@ -55,9 +54,9 @@ Documents,"DOCUMENT A document. (Entered )" 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,2,,Nominal,Input,10,Left,A10,A10, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +x,1,Scale,Input,8,Right,F8.2,F8.2 +name,2,Nominal,Input,10,Left,A10,A10 ]) AT_CLEANUP diff --git a/tests/language/dictionary/value-labels.at b/tests/language/dictionary/value-labels.at index b821500443..1873d3779b 100644 --- a/tests/language/dictionary/value-labels.at +++ b/tests/language/dictionary/value-labels.at @@ -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,Scale,Input,8,Right,ADATE10,ADATE10 +dt,2,Scale,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,Scale,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,Scale,Input,8,Right,F8.2,F8.2 Table: Value Labels Variable Value,,Label diff --git a/tests/language/dictionary/variable-display.at b/tests/language/dictionary/variable-display.at index 1e6142b335..fae03a50cb 100644 --- a/tests/language/dictionary/variable-display.at +++ b/tests/language/dictionary/variable-display.at @@ -28,10 +28,10 @@ DISPLAY DICTIONARY. AT_CHECK([pspp -o pspp.csv var-display.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,Output,10,Left,F8.2,F8.2, -y,2,,Ordinal,Both,12,Right,F8.2,F8.2, -z,3,,Nominal,None,14,Center,F8.2,F8.2, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +x,1,Scale,Output,10,Left,F8.2,F8.2 +y,2,Ordinal,Both,12,Right,F8.2,F8.2 +z,3,Nominal,None,14,Center,F8.2,F8.2 ]) AT_CLEANUP diff --git a/tests/language/stats/autorecode.at b/tests/language/stats/autorecode.at index 371746117f..78c8aabfd2 100644 --- a/tests/language/stats/autorecode.at +++ b/tests/language/stats/autorecode.at @@ -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,Scale,Input,8,Right,F1.0,F1.0 Table: Value Labels Variable Value,,Label diff --git a/tests/language/stats/crosstabs.at b/tests/language/stats/crosstabs.at index 40117dc7e9..de13f1b6b1 100644 --- a/tests/language/stats/crosstabs.at +++ b/tests/language/stats/crosstabs.at @@ -79,8 +79,12 @@ Table: Summary x × y,0,.0%,1,100.0%,1,100.0% Table: x × y -,, -,, +,,,y,,,,,,,Total +,,,1.00,2.00,3.00,4.00,5.00,6.00,7.00, +x,1.00,Count,,,,,,,, +,2.00,,,,,,,,, +,3.00,,,,,,,,, +Total,,,,,,,,,, ]]) AT_CLEANUP diff --git a/tests/language/stats/frequencies.at b/tests/language/stats/frequencies.at index df52790acf..1d91a6e292 100644 --- a/tests/language/stats/frequencies.at +++ b/tests/language/stats/frequencies.at @@ -793,9 +793,9 @@ Maximum,,. @&t@ Sum,,. @&t@ Table: x -,,Frequency,Percent,Valid Percent,Cumulative Percent -Missing,. ,3,100.0%,, -Total,,3,.0%,, +,,Frequency,Percent +Missing,. ,3,100.0% +Total,,3,.0% ]) AT_CLEANUP diff --git a/tests/language/stats/glm.at b/tests/language/stats/glm.at index 721bbc121a..4cf2faff03 100644 --- a/tests/language/stats/glm.at +++ b/tests/language/stats/glm.at @@ -227,7 +227,6 @@ AT_CHECK([pspp -O format=csv type1.sps], [0], Table: Tests of Between-Subjects Effects ,Type I Sum Of Squares,df,Mean Square,F,Sig. Corrected Model,216.017,7,30.860,5.046,.001 -Intercept,,,,, Agrp,9.579,1,9.579,1.566,.220 Bgrp,186.225,3,62.075,10.151,.000 Agrp × Bgrp,20.212,3,6.737,1.102,.364 @@ -238,7 +237,6 @@ Corrected Total,399.474,37,,, Table: Tests of Between-Subjects Effects ,Type I Sum Of Squares,df,Mean Square,F,Sig. Corrected Model,216.017,7,30.860,5.046,.001 -Intercept,,,,, Bgrp,193.251,3,64.417,10.534,.000 Agrp,2.553,1,2.553,.418,.523 Bgrp × Agrp,20.212,3,6.737,1.102,.364 @@ -262,7 +260,6 @@ AT_CHECK([pspp -O format=csv type2.sps], [0], Table: Tests of Between-Subjects Effects ,Type II Sum Of Squares,df,Mean Square,F,Sig. Corrected Model,216.017,7,30.860,5.046,.001 -Intercept,,,,, Agrp,2.553,1,2.553,.418,.523 Bgrp,186.225,3,62.075,10.151,.000 Agrp × Bgrp,20.212,3,6.737,1.102,.364 diff --git a/tests/language/stats/rank.at b/tests/language/stats/rank.at index d8fc9655a4..eb0b71b107 100644 --- a/tests/language/stats/rank.at +++ b/tests/language/stats/rank.at @@ -121,15 +121,15 @@ a,count,N b,Nb,N Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -a,1,,Scale,Input,8,Right,F8.2,F8.2, -b,2,,Scale,Input,8,Right,F8.2,F8.2, -Ra,3,RANK of a,Scale,Input,8,Right,F9.3,F9.3, -RFR001,4,RFRACTION of a,Scale,Input,8,Right,F6.4,F6.4, -count,5,N of a,Scale,Input,8,Right,F6.0,F6.0, -Rb,6,RANK of b,Scale,Input,8,Right,F9.3,F9.3, -RFR002,7,RFRACTION of b,Scale,Input,8,Right,F6.4,F6.4, -Nb,8,N of b,Scale,Input,8,Right,F6.0,F6.0, +Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format +a,1,,Scale,Input,8,Right,F8.2,F8.2 +b,2,,Scale,Input,8,Right,F8.2,F8.2 +Ra,3,RANK of a,Scale,Input,8,Right,F9.3,F9.3 +RFR001,4,RFRACTION of a,Scale,Input,8,Right,F6.4,F6.4 +count,5,N of a,Scale,Input,8,Right,F6.0,F6.0 +Rb,6,RANK of b,Scale,Input,8,Right,F9.3,F9.3 +RFR002,7,RFRACTION of b,Scale,Input,8,Right,F6.4,F6.4 +Nb,8,N of b,Scale,Input,8,Right,F6.0,F6.0 Table: Data List a,b,Ra,RFR001,count,Rb,RFR002,Nb @@ -476,11 +476,11 @@ Existing Variable,New Variable,Function foo,RAN001,RANK Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -foo,1,,Scale,Input,8,Right,F8.2,F8.2, -rfoo,2,,Scale,Input,8,Right,F8.2,F8.2, -ran003,3,,Scale,Input,8,Right,F8.2,F8.2, -RAN001,4,RANK of foo,Scale,Input,8,Right,F9.3,F9.3, +Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format +foo,1,,Scale,Input,8,Right,F8.2,F8.2 +rfoo,2,,Scale,Input,8,Right,F8.2,F8.2 +ran003,3,,Scale,Input,8,Right,F8.2,F8.2 +RAN001,4,RANK of foo,Scale,Input,8,Right,F9.3,F9.3 ]) AT_CLEANUP diff --git a/tests/perl-module.at b/tests/perl-module.at index 69e713c4aa..58b3900cdf 100644 --- a/tests/perl-module.at +++ b/tests/perl-module.at @@ -95,9 +95,9 @@ Table: Documents These Documents Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -legal,1,,Scale,Input,8,Right,F9.2,F9.2, -money,2,,Scale,Input,8,Right,DOLLAR6.2,DOLLAR6.2, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +legal,1,Scale,Input,8,Right,F9.2,F9.2 +money,2,Scale,Input,8,Right,DOLLAR6.2,DOLLAR6.2 dump-dict.sps:5: note: SHOW: WEIGHT is money. ]) @@ -167,9 +167,9 @@ LIST. ]) AT_CHECK([pspp -O format=csv dump-dicts.sps], [0], [dnl Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -id,1,,Scale,Input,8,Right,F2.0,F2.0, -name,2,,Nominal,Input,20,Left,A20,A20, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +id,1,Scale,Input,8,Right,F2.0,F2.0 +name,2,Nominal,Input,20,Left,A20,A20 Table: File Label Label,This is the file label @@ -182,9 +182,9 @@ id,name 34,frederick Table: Variables -Name,Position,Label,Measurement Level,Role,Width,Alignment,Print Format,Write Format,Missing Values -id,1,,Scale,Input,8,Right,F2.0,F2.0, -name,2,,Nominal,Input,20,Left,A20,A20, +Name,Position,Measurement Level,Role,Width,Alignment,Print Format,Write Format +id,1,Scale,Input,8,Right,F2.0,F2.0 +name,2,Nominal,Input,20,Left,A20,A20 Table: File Label Label,This is the file label