From 403c74a05af7a60bb377b6a6a700f158386f6cb7 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 11 Aug 2025 13:20:26 -0700 Subject: [PATCH] work --- rust/Cargo.lock | 59 ++++- rust/pspp/Cargo.toml | 1 + rust/pspp/src/dictionary.rs | 22 ++ rust/pspp/src/main.rs | 250 +++++++++++++++--- rust/pspp/src/output/cairo/driver.rs | 37 +-- rust/pspp/src/output/csv.rs | 4 +- rust/pspp/src/output/driver.rs | 124 ++++++--- rust/pspp/src/output/page.rs | 18 +- rust/pspp/src/output/pivot/test.rs | 2 +- rust/pspp/src/output/spv.rs | 112 +++++++- rust/pspp/src/output/text.rs | 20 +- rust/pspp/src/sys/cooked.rs | 12 +- rust/pspp/src/sys/test.rs | 243 ++++++++--------- .../pspp/src/sys/testdata/attributes.expected | 1 + .../bad_machine_float_info_size.expected | 1 + .../bad_machine_integer_info_count.expected | 1 + ...d_machine_integer_info_endianness.expected | 1 + ...machine_integer_info_float_format.expected | 1 + ...e_name_in_long_string_value_label.expected | 1 + ...iable_name_in_variable_value_pair.expected | 1 + .../bad_very_long_string_length.expected | 1 + ...ad_very_long_string_segment_width.expected | 1 + .../src/sys/testdata/compressed_data.expected | 1 + .../compressed_data_other_bias.expected | 1 + .../compressed_data_zero_bias.expected | 1 + rust/pspp/src/sys/testdata/documents.expected | 1 + .../duplicate_attribute_name.expected | 1 + .../duplicate_long_variable_name.expected | 1 + .../duplicate_value_labels_type.expected | 1 + .../testdata/duplicate_variable_name.expected | 1 + .../testdata/empty_document_record.expected | 1 + .../sys/testdata/extra_product_info.expected | 1 + ...rds_than_indicated_by_file_header.expected | 1 + ...ows_in_long_string_missing_values.expected | 1 + ...nvalid_long_string_missing_values.expected | 1 + .../testdata/invalid_variable_format.expected | 1 + .../testdata/invalid_variable_name.expected | 1 + .../sys/testdata/long_variable_names.expected | 1 + .../testdata/missing_attribute_value.expected | 1 + ...ine_after_variable_name_in_mrsets.expected | 1 + .../missing_string_continuation.expected | 1 + .../mixed_variable_types_in_mrsets.expected | 1 + ...rds_than_indicated_by_file_header.expected | 1 + .../multiple_documents_records.expected | 1 + .../testdata/multiple_response_sets.expected | 1 + ..._response_sets_bad_counted_string.expected | 1 + .../multiple_response_sets_bad_name.expected | 1 + ...se_sets_counted_string_bad_length.expected | 1 + ...sets_counted_string_missing_space.expected | 1 + ...onse_sets_duplicate_variable_name.expected | 1 + ...esponse_sets_missing_label_source.expected | 1 + ...ssing_newline_after_variable_name.expected | 1 + ...sponse_sets_missing_space_after_c.expected | 1 + ...issing_space_after_counted_string.expected | 1 + ...sponse_sets_missing_space_after_e.expected | 1 + ...onse_sets_unexpected_label_source.expected | 1 + .../src/sys/testdata/no_variables.expected | 1 + ..._skipping_bad_extension_record_18.expected | 1 + .../partial_compressed_data_record.expected | 1 + ...ial_data_record_between_variables.expected | 1 + ...al_data_record_within_long_string.expected | 1 + .../src/sys/testdata/test-encrypted.expected | 1 + ...record_names_long_string_variable.expected | 1 + .../sys/testdata/unknown_encoding.expected | 1 + .../unknown_extension_record.expected | 1 + .../unquoted_attribute_value.expected | 1 + ...fied_number_of_variable_positions.expected | 1 + ..._indexes_must_be_in_correct_range.expected | 1 + ...t_not_be_long_string_continuation.expected | 1 + ...abel_with_no_associated_variables.expected | 1 + .../src/sys/testdata/value_labels.expected | 1 + .../variable_display_with_width.expected | 1 + .../variable_display_without_width.expected | 1 + ...ariable_labels_and_missing_values.expected | 1 + .../src/sys/testdata/variable_roles.expected | 1 + .../src/sys/testdata/variable_sets.expected | 1 + .../variable_sets_unknown_variable.expected | 1 + ...value_label_must_all_be_same_type.expected | 1 + .../sys/testdata/very_long_strings.expected | 1 + .../testdata/weight_must_be_numeric.expected | 1 + .../weight_variable_bad_index.expected | 1 + .../weight_variable_continuation.expected | 1 + .../testdata/write-numeric-simple.expected | 1 + .../write-numeric-uncompressed.expected | 1 + .../sys/testdata/write-numeric-zlib.expected | 1 + .../sys/testdata/write-string-simple.expected | 1 + .../write-string-uncompressed.expected | 1 + .../sys/testdata/write-string-zlib.expected | 1 + .../testdata/wrong_display_alignment.expected | 1 + .../wrong_display_measurement_level.expected | 1 + .../wrong_display_parameter_count.expected | 1 + .../wrong_display_parameter_size.expected | 1 + .../testdata/wrong_special_floats.expected | 1 + .../wrong_variable_positions.expected | 1 + .../wrong_variable_positions_but_v13.expected | 1 + .../sys/testdata/zcompressed_data.expected | 1 + ...data_uncompressed_size_block_size.expected | 1 + .../zero_or_one_variable_in_mrset.expected | 1 + 98 files changed, 736 insertions(+), 253 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index f07ce38b34..169d491b73 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1637,6 +1637,7 @@ dependencies = [ "smallstr", "smallvec", "thiserror", + "toml 0.9.5", "unicase", "unicode-linebreak", "unicode-properties", @@ -1866,6 +1867,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" +dependencies = [ + "serde", +] + [[package]] name = "sha1" version = "0.10.6" @@ -1992,7 +2002,7 @@ dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml", + "toml 0.8.22", "version-compare", ] @@ -2119,11 +2129,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" dependencies = [ "serde", - "serde_spanned", - "toml_datetime", + "serde_spanned 0.6.8", + "toml_datetime 0.6.9", "toml_edit", ] +[[package]] +name = "toml" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" +dependencies = [ + "indexmap", + "serde", + "serde_spanned 1.0.0", + "toml_datetime 0.7.0", + "toml_parser", + "toml_writer", + "winnow", +] + [[package]] name = "toml_datetime" version = "0.6.9" @@ -2133,6 +2158,15 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +dependencies = [ + "serde", +] + [[package]] name = "toml_edit" version = "0.22.26" @@ -2141,11 +2175,26 @@ checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" dependencies = [ "indexmap", "serde", - "serde_spanned", - "toml_datetime", + "serde_spanned 0.6.8", + "toml_datetime 0.6.9", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" +dependencies = [ "winnow", ] +[[package]] +name = "toml_writer" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" + [[package]] name = "tower" version = "0.4.13" diff --git a/rust/pspp/Cargo.toml b/rust/pspp/Cargo.toml index b26173eb5d..a6c91db728 100644 --- a/rust/pspp/Cargo.toml +++ b/rust/pspp/Cargo.toml @@ -51,6 +51,7 @@ zeroize = "1.8.1" unicode-properties = "0.1.3" unicode-segmentation = "1.12.0" serde_json = "1.0.141" +toml = "0.9.5" [target.'cfg(windows)'.dependencies] windows-sys = { version = "0.48.0", features = ["Win32_Globalization"] } diff --git a/rust/pspp/src/dictionary.rs b/rust/pspp/src/dictionary.rs index d7db117319..e01e8af5b5 100644 --- a/rust/pspp/src/dictionary.rs +++ b/rust/pspp/src/dictionary.rs @@ -519,6 +519,27 @@ impl Dictionary { (group, values) } + pub fn to_pivot_table(&self) -> PivotTable { + let (group, data) = self.to_pivot_rows(); + PivotTable::new([(Axis3::Y, Dimension::new(group))]).with_data( + data.into_iter() + .enumerate() + .filter(|(_row, value)| !value.is_empty()) + .map(|(row, value)| ([row], value)), + ) + } + + pub fn all_pivot_tables(&self) -> Vec { + let mut pivot_tables = Vec::new(); + pivot_tables.push(self.to_pivot_table()); + pivot_tables.push(self.output_variables().to_pivot_table()); + pivot_tables.extend(self.output_value_labels().to_pivot_table()); + pivot_tables.extend(self.output_mrsets().to_pivot_table()); + pivot_tables.extend(self.output_attributes().to_pivot_table()); + pivot_tables.extend(self.output_variable_sets().to_pivot_table()); + pivot_tables + } + pub fn short_names(&self) -> Vec> { struct PickShortName<'a> { variable_name: &'a Identifier, @@ -717,6 +738,7 @@ impl<'a> OutputVariables<'a> { (Axis3::Y, Dimension::new(names)), (Axis3::X, Dimension::new(attributes)), ]) + .with_title("Variables") .with_show_empty(); for (var_index, variable) in self.dictionary.variables.iter().enumerate() { for (field, field_index) in &columns { diff --git a/rust/pspp/src/main.rs b/rust/pspp/src/main.rs index 77c63ba1f5..2c7287e95d 100644 --- a/rust/pspp/src/main.rs +++ b/rust/pspp/src/main.rs @@ -19,6 +19,10 @@ use clap::{Args, Parser, Subcommand, ValueEnum}; use encoding_rs::Encoding; use pspp::{ crypto::EncryptedFile, + output::{ + driver::{Config, Driver, DriverType}, + Details, Item, Text, + }, sys::{ self, raw::{infer_encoding, records::Compression, Decoder, Magic, Reader, Record}, @@ -27,10 +31,15 @@ use pspp::{ }; use serde::Serialize; use std::{ + cell::RefCell, + ffi::OsStr, + fmt::{Display, Write as _}, fs::File, io::{stdout, BufReader, Write}, path::{Path, PathBuf}, - str, + rc::Rc, + str::{self, FromStr}, + sync::Arc, }; use thiserror::Error as ThisError; use zeroize::Zeroizing; @@ -226,38 +235,153 @@ impl Decrypt { /// Show SPSS system file dictionary and data. #[derive(Args, Clone, Debug)] struct Show { + /// File to show. + #[arg(required = true)] + input_file: PathBuf, + + /// Output file name. If omitted, output is written to stdout. + output_file: Option, + + /// Output driver configuration options. + #[arg(short = 'o')] + output_options: Vec, + /// Maximum number of cases to print. #[arg(long = "data", default_value_t = 0)] max_cases: u64, - /// Files to show. - #[arg(required = true)] - files: Vec, - /// What to show. #[arg(short, long, value_enum, default_value_t)] mode: Mode, /// Output format. - #[arg(long, value_enum, default_value_t)] - format: ShowFormat, + #[arg(long, value_parser = ShowFormat::from_str)] + format: Option, /// The encoding to use. #[arg(long, value_parser = parse_encoding)] encoding: Option<&'static Encoding>, } -impl Show { - fn run(self) -> Result<()> { - for file in &self.files { - self.show(file)?; +enum Output { + Driver { + driver: Rc>>, + mode: Mode, + }, + Json { + writer: Rc>>, + pretty: bool, + }, +} + +impl Output { + fn show_json(&self, value: &T) -> Result<()> + where + T: Serialize, + { + match self { + Self::Driver { mode, driver: _ } => { + Err(anyhow!("Mode '{mode}' only supports output as JSON.")) + } + Self::Json { writer, pretty } => { + let mut writer = writer.borrow_mut(); + match pretty { + true => serde_json::to_writer_pretty(&mut *writer, value)?, + false => serde_json::to_writer(&mut *writer, value)?, + }; + writeln!(writer)?; + Ok(()) + } + } + } + + fn warn(&self, warning: &impl Display) { + match self { + Output::Driver { driver, .. } => { + driver + .borrow_mut() + .write(&Arc::new(Item::from(Text::new_log(warning.to_string())))); + } + Output::Json { .. } => { + #[derive(Serialize)] + struct Warning { + warning: String, + } + let warning = Warning { + warning: warning.to_string(), + }; + let _ = self.show_json(&warning); + } } - Ok(()) } - fn show(&self, file_name: &Path) -> Result<()> { - let reader = File::open(file_name)?; +} + +impl Show { + fn run(self) -> Result<()> { + let format = if let Some(format) = self.format { + format + } else if let Some(output_file) = &self.output_file { + ShowFormat::from_str( + output_file + .extension() + .unwrap_or(OsStr::new("")) + .to_str() + .unwrap_or(""), + ) + .map_err(|_| { + anyhow!( + "{}: no default output format for file name", + output_file.display() + ) + })? + } else { + ShowFormat::Json + }; + + let output = if let ShowFormat::Output(driver) = format { + let mut config = String::new(); + + #[derive(Serialize)] + struct DriverConfig { + driver: DriverType, + } + config.push_str(&toml::to_string_pretty(&DriverConfig { driver }).unwrap()); + + if let Some(file) = &self.output_file { + #[derive(Serialize)] + struct File<'a> { + file: &'a Path, + } + let file = File { + file: file.as_path(), + }; + let toml_file = toml::to_string_pretty(&file).unwrap(); + config.push_str(&toml_file); + + for option in &self.output_options { + writeln!(&mut config, "{option}").unwrap(); + } + } + + let config: Config = toml::from_str(&config)?; + Output::Driver { + mode: self.mode, + driver: Rc::new(RefCell::new(Box::new(::new(&config)?))), + } + } else { + Output::Json { + pretty: format == ShowFormat::Json, + writer: if let Some(output_file) = &self.output_file { + Rc::new(RefCell::new(Box::new(File::create(output_file)?))) + } else { + Rc::new(RefCell::new(Box::new(stdout()))) + }, + } + }; + + let reader = File::open(&self.input_file)?; let reader = BufReader::new(reader); - let mut reader = Reader::new(reader, Box::new(|warning| println!("{warning}")))?; + let mut reader = Reader::new(reader, Box::new(|warning| output.warn(&warning)))?; match self.mode { Mode::Identify => { @@ -269,62 +393,69 @@ impl Show { return Ok(()); } Mode::Raw => { - self.show_json(reader.header())?; + output.show_json(reader.header())?; for record in reader.records() { - self.show_json(&record?)?; + output.show_json(&record?)?; } for (_index, case) in (0..self.max_cases).zip(reader.cases()) { - self.show_json(&case?)?; + output.show_json(&case?)?; } } Mode::Decoded => { let records: Vec = reader.records().collect::, _>>()?; let encoding = match self.encoding { Some(encoding) => encoding, - None => infer_encoding(&records, &mut |e| eprintln!("{e}"))?, + None => infer_encoding(&records, &mut |e| output.warn(&e))?, }; - let mut decoder = Decoder::new(encoding, |e| eprintln!("{e}")); + let mut decoder = Decoder::new(encoding, |e| output.warn(&e)); for record in records { - self.show_json(&record.decode(&mut decoder))?; + output.show_json(&record.decode(&mut decoder))?; } } Mode::Parsed => { let records: Vec = reader.records().collect::, _>>()?; let encoding = match self.encoding { Some(encoding) => encoding, - None => infer_encoding(&records, &mut |e| eprintln!("{e}"))?, + None => infer_encoding(&records, &mut |e| output.warn(&e))?, }; - let mut decoder = Decoder::new(encoding, |e| eprintln!("{e}")); + let mut decoder = Decoder::new(encoding, |e| output.warn(&e)); let records = Records::from_raw(records, &mut decoder); let (dictionary, metadata, cases) = records .decode( reader.header().clone().decode(&mut decoder), reader.cases(), encoding, - |e| eprintln!("{e}"), + |e| output.warn(&e), ) .into_parts(); - self.show_json(&dictionary)?; - self.show_json(&metadata)?; - for (_index, case) in (0..self.max_cases).zip(cases) { - self.show_json(&case?)?; + match &output { + Output::Driver { driver, mode: _ } => { + driver + .borrow_mut() + .write(&Arc::new(Item::new(metadata.to_pivot_table()))); + driver + .borrow_mut() + .write(&Arc::new(Item::new(Details::Group( + dictionary + .all_pivot_tables() + .into_iter() + .map(|pivot_table| Arc::new(Item::new(pivot_table))) + .collect(), + )))); + } + Output::Json { .. } => { + output.show_json(&dictionary)?; + output.show_json(&metadata)?; + for (_index, case) in (0..self.max_cases).zip(cases) { + output.show_json(&case?)?; + } + } } } } Ok(()) } - fn show_json(&self, value: &T) -> Result<()> - where - T: Serialize, - { - match self.format { - ShowFormat::Json => serde_json::to_writer_pretty(stdout(), value)?, - ShowFormat::Ndjson => serde_json::to_writer(stdout(), value)?, - }; - println!(); - Ok(()) - } } #[derive(Subcommand, Clone, Debug)] @@ -364,13 +495,52 @@ enum Mode { Parsed, } -#[derive(Clone, Copy, Debug, Default, ValueEnum)] +impl Mode { + fn as_str(&self) -> &'static str { + match self { + Mode::Identify => "identify", + Mode::Raw => "raw", + Mode::Decoded => "decoded", + Mode::Parsed => "parsed", + } + } +} + +impl Display for Mode { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +#[derive(Clone, Copy, Debug, Default, PartialEq, Serialize)] +#[serde(rename_all = "snake_case")] enum ShowFormat { /// Pretty-printed JSON. #[default] Json, /// Newline-delimited JSON. Ndjson, + Output(DriverType), +} + +#[derive(ThisError, Debug)] +#[error("{0}: unknown format")] +struct UnknownFormat(String); + +impl FromStr for ShowFormat { + type Err = UnknownFormat; + + fn from_str(s: &str) -> Result { + if s.eq_ignore_ascii_case("json") { + Ok(Self::Json) + } else if s.eq_ignore_ascii_case("ndjson") { + Ok(Self::Ndjson) + } else if let Ok(driver_type) = DriverType::from_str(s, true) { + Ok(Self::Output(driver_type)) + } else { + Err(UnknownFormat(String::from(s))) + } + } } fn main() -> Result<()> { diff --git a/rust/pspp/src/output/cairo/driver.rs b/rust/pspp/src/output/cairo/driver.rs index c0931408eb..fbcabc06c0 100644 --- a/rust/pspp/src/output/cairo/driver.rs +++ b/rust/pspp/src/output/cairo/driver.rs @@ -31,7 +31,7 @@ use crate::output::{ pager::{CairoPageStyle, CairoPager}, }, driver::Driver, - page::Setup, + page::PageSetup, pivot::{Color, Coord2, FontStyle}, Item, }; @@ -41,18 +41,17 @@ use crate::output::pivot::Axis2; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct CairoConfig { /// Output file name. - pub path: PathBuf, + pub file: PathBuf, /// Page setup. - #[serde(flatten)] - pub setup: Setup, + pub page_setup: Option, } impl CairoConfig { pub fn new(path: impl AsRef) -> Self { Self { - path: path.as_ref().to_path_buf(), - setup: Setup::default(), + file: path.as_ref().to_path_buf(), + page_setup: None, } } } @@ -70,16 +69,24 @@ impl CairoDriver { (inches * 72.0 * SCALE as f64).max(0.0).round() as usize } - let printable = config.setup.printable_size(); + let default_page_setup; + let page_setup = match &config.page_setup { + Some(page_setup) => page_setup, + None => { + default_page_setup = PageSetup::default(); + &default_page_setup + } + }; + let printable = page_setup.printable_size(); let page_style = CairoPageStyle { margins: EnumMap::from_fn(|axis| { [ - scale(config.setup.margins[axis][0]), - scale(config.setup.margins[axis][1]), + scale(page_setup.margins[axis][0]), + scale(page_setup.margins[axis][1]), ] }), - headings: config.setup.headings.clone(), - initial_page_number: config.setup.initial_page_number, + headings: page_setup.headings.clone(), + initial_page_number: page_setup.initial_page_number, }; let size = Coord2::new(scale(printable[Axis2::X]), scale(printable[Axis2::Y])); let font = FontStyle { @@ -102,13 +109,13 @@ impl CairoDriver { font, fg: Color::BLACK, use_system_colors: false, - object_spacing: scale(config.setup.object_spacing), + object_spacing: scale(page_setup.object_spacing), font_resolution: 72.0, }; let surface = PdfSurface::new( - config.setup.paper[Axis2::X] * 72.0, - config.setup.paper[Axis2::Y] * 72.0, - &config.path, + page_setup.paper[Axis2::X] * 72.0, + page_setup.paper[Axis2::Y] * 72.0, + &config.file, )?; Ok(Self { fsm_style: Arc::new(fsm_style), diff --git a/rust/pspp/src/output/csv.rs b/rust/pspp/src/output/csv.rs index dba4cd2cf8..5690f1b711 100644 --- a/rust/pspp/src/output/csv.rs +++ b/rust/pspp/src/output/csv.rs @@ -31,7 +31,7 @@ use super::{driver::Driver, pivot::PivotTable, table::Table, Details, Item, Text #[derive(Clone, Debug, Serialize, Deserialize)] pub struct CsvConfig { - path: PathBuf, + file: PathBuf, #[serde(flatten)] options: CsvOptions, } @@ -101,7 +101,7 @@ impl Display for CsvField<'_> { impl CsvDriver { pub fn new(config: &CsvConfig) -> std::io::Result { Ok(Self { - file: File::create(&config.path)?, + file: File::create(&config.file)?, options: config.options.clone(), n_items: 0, }) diff --git a/rust/pspp/src/output/driver.rs b/rust/pspp/src/output/driver.rs index eeddcfd89e..9b272f6a05 100644 --- a/rust/pspp/src/output/driver.rs +++ b/rust/pspp/src/output/driver.rs @@ -16,36 +16,18 @@ use std::{borrow::Cow, sync::Arc}; +use clap::ValueEnum; use serde::{Deserialize, Serialize}; use crate::output::{ cairo::{CairoConfig, CairoDriver}, csv::{CsvConfig, CsvDriver}, html::{HtmlConfig, HtmlDriver}, + spv::{SpvConfig, SpvDriver}, text::{TextConfig, TextDriver}, }; -use super::{page::Setup, Item}; - -#[derive(Clone, Debug, Serialize, Deserialize)] -#[serde(tag = "driver", rename_all = "snake_case")] -pub enum Config { - Text(TextConfig), - Pdf(CairoConfig), - Html(HtmlConfig), - Csv(CsvConfig), -} - -impl dyn Driver { - fn new(config: &Config) -> anyhow::Result> { - match config { - Config::Text(text_config) => Ok(Box::new(TextDriver::new(text_config)?)), - Config::Pdf(cairo_config) => Ok(Box::new(CairoDriver::new(cairo_config)?)), - Config::Html(html_config) => Ok(Box::new(HtmlDriver::new(html_config)?)), - Config::Csv(csv_config) => Ok(Box::new(CsvDriver::new(csv_config)?)), - } - } -} +use super::{page::PageSetup, Item}; // An output driver. pub trait Driver { @@ -54,7 +36,7 @@ pub trait Driver { fn write(&mut self, item: &Arc); /// Returns false if the driver doesn't support page setup. - fn setup(&mut self, page_setup: &Setup) -> bool { + fn setup(&mut self, page_setup: &PageSetup) -> bool { let _ = page_setup; false } @@ -82,29 +64,85 @@ pub trait Driver { } } -/* -/// An abstract way for the output subsystem to create an output driver. -trait DriverFactory { - /// The file extension, without the leading dot, e.g. "pdf". - fn extension(&self) -> OsString; +impl Driver for Box { + fn name(&self) -> Cow<'static, str> { + (&**self).name() + } - /// The default file name, including extension. - /// - /// If this is `-`, that implies that by default output will be directed to - /// stdout. - fn default_file_name(&self) -> PathBuf; + fn write(&mut self, item: &Arc) { + (&mut **self).write(item); + } - /// Creates a new output driver of this class. `name` and `type` should be - /// passed directly to output_driver_init. - /// - /// It is up to the driver class to decide how to interpret `options`. The - /// create function should delete pairs that it understands from `options`, - /// because the caller may issue errors about unknown options for any pairs - /// that remain. - fn create(&self, file_handle: (), + fn setup(&mut self, page_setup: &PageSetup) -> bool { + (&mut **self).setup(page_setup) + } + + fn flush(&mut self) { + (&mut **self).flush(); + } + + fn handles_show(&self) -> bool { + (&**self).handles_show() + } - enum settings_output_devices type, - struct driver_options *); + fn handles_groups(&self) -> bool { + (&**self).handles_groups() + } +} +#[derive(Clone, Debug, Serialize, Deserialize)] +#[serde(tag = "driver", rename_all = "snake_case")] +pub enum Config { + Text(TextConfig), + Pdf(CairoConfig), + Html(HtmlConfig), + Csv(CsvConfig), + Spv(SpvConfig), +} + +#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, ValueEnum)] +#[serde(rename_all = "snake_case")] +pub enum DriverType { + Text, + Pdf, + Html, + Csv, + Spv, +} + +impl dyn Driver { + pub fn new(config: &Config) -> anyhow::Result> { + match config { + Config::Text(text_config) => Ok(Box::new(TextDriver::new(text_config)?)), + Config::Pdf(cairo_config) => Ok(Box::new(CairoDriver::new(cairo_config)?)), + Config::Html(html_config) => Ok(Box::new(HtmlDriver::new(html_config)?)), + Config::Csv(csv_config) => Ok(Box::new(CsvDriver::new(csv_config)?)), + Config::Spv(spv_config) => Ok(Box::new(SpvDriver::new(spv_config)?)), + } + } +} + +#[cfg(test)] +mod tests { + use serde::Serialize; + + use crate::output::driver::Config; + + #[test] + fn toml() { + let config = r#"driver = "text" +file = "filename.text" +"#; + let toml: Config = toml::from_str(config).unwrap(); + println!("{}", toml::to_string_pretty(&toml).unwrap()); + + #[derive(Serialize)] + struct Map<'a> { + file: &'a str, + } + println!( + "{}", + toml::to_string_pretty(&Map { file: "filename" }).unwrap() + ); + } } -*/ diff --git a/rust/pspp/src/output/page.rs b/rust/pspp/src/output/page.rs index 87015f6a7d..4240b8d9f5 100644 --- a/rust/pspp/src/output/page.rs +++ b/rust/pspp/src/output/page.rs @@ -27,13 +27,21 @@ pub enum Orientation { Landscape, } +/// Chart size. #[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ChartSize { + /// Size specified in the chart itself. #[default] AsIs, + + /// Full page. FullHeight, + + /// Half-page. HalfHeight, + + /// Quarter-page. QuarterHeight, } @@ -56,7 +64,9 @@ impl Default for Paragraph { pub struct Heading(pub Vec); #[derive(Clone, Debug, Deserialize, Serialize)] -pub struct Setup { +#[serde(default)] +pub struct PageSetup { + /// Page number of first page. pub initial_page_number: i32, /// Paper size in inches. @@ -65,18 +75,20 @@ pub struct Setup { /// Margin width in inches. pub margins: EnumMap, + /// Portrait or landscape. pub orientation: Orientation, /// Space between objects, in inches. pub object_spacing: f64, + /// Size of charts. pub chart_size: ChartSize, /// Header and footer. pub headings: [Heading; 2], } -impl Default for Setup { +impl Default for PageSetup { fn default() -> Self { Self { initial_page_number: 1, @@ -90,7 +102,7 @@ impl Default for Setup { } } -impl Setup { +impl PageSetup { pub fn printable_size(&self) -> EnumMap { EnumMap::from_fn(|axis| self.paper[axis] - self.margins[axis][0] - self.margins[axis][1]) } diff --git a/rust/pspp/src/output/pivot/test.rs b/rust/pspp/src/output/pivot/test.rs index e66ee0f1c0..a69f821532 100644 --- a/rust/pspp/src/output/pivot/test.rs +++ b/rust/pspp/src/output/pivot/test.rs @@ -186,7 +186,7 @@ pub fn assert_rendering(name: &str, pivot_table: &PivotTable, expected: &str) { if let Some(dir) = std::env::var_os("PSPP_TEST_SPV_DIR") { let writer = File::create(Path::new(&dir).join(name).with_extension("spv")).unwrap(); - SpvDriver::new(writer).write(&item); + SpvDriver::for_writer(writer).write(&item); } } diff --git a/rust/pspp/src/output/spv.rs b/rust/pspp/src/output/spv.rs index 378a598e44..3255953453 100644 --- a/rust/pspp/src/output/spv.rs +++ b/rust/pspp/src/output/spv.rs @@ -18,8 +18,10 @@ use core::f64; use std::{ borrow::Cow, fmt::Write as _, + fs::File, io::{Cursor, Seek, Write}, iter::{repeat, repeat_n}, + path::PathBuf, sync::Arc, }; @@ -31,6 +33,7 @@ use quick_xml::{ writer::Writer as XmlWriter, ElementWriter, }; +use serde::{Deserialize, Serialize}; use smallstr::SmallString; use zip::{result::ZipResult, write::SimpleFileOptions, ZipWriter}; @@ -38,6 +41,7 @@ use crate::{ format::{Format, Type}, output::{ driver::Driver, + page::{Heading, PageSetup}, pivot::{ Area, AreaStyle, Axis2, Axis3, Border, BorderStyle, BoxBorder, Category, CellStyle, Color, Dimension, FontStyle, Footnote, FootnoteMarkerPosition, FootnoteMarkerType, @@ -60,6 +64,15 @@ fn output_viewer_name(heading_id: u64, is_heading: bool) -> String { ) } +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct SpvConfig { + /// Output file name. + pub file: PathBuf, + + /// Page setup. + pub page_setup: Option, +} + pub struct SpvDriver where W: Write + Seek, @@ -68,13 +81,24 @@ where needs_page_break: bool, next_table_id: u64, next_heading_id: u64, + page_setup: Option, +} + +impl SpvDriver { + pub fn new(config: &SpvConfig) -> std::io::Result { + let mut driver = Self::for_writer(File::create(&config.file)?); + if let Some(page_setup) = &config.page_setup { + driver = driver.with_page_setup(page_setup.clone()); + } + Ok(driver) + } } impl SpvDriver where W: Write + Seek, { - pub fn new(writer: W) -> Self { + pub fn for_writer(writer: W) -> Self { let mut writer = ZipWriter::new(writer); writer .start_file("META-INF/MANIFEST.MF", SimpleFileOptions::default()) @@ -85,6 +109,14 @@ where needs_page_break: false, next_table_id: 1, next_heading_id: 1, + page_setup: None, + } + } + + pub fn with_page_setup(self, page_setup: PageSetup) -> Self { + Self { + page_setup: Some(page_setup), + ..self } } @@ -533,7 +565,9 @@ where .write_inner_content(|w| { w.create_element("label") .write_text_content(BytesText::new("Output"))?; - // XXX page setup + if let Some(page_setup) = self.page_setup.take() { + write_page_setup(&page_setup, w)?; + } self.write_item(item, w); Ok(()) }) @@ -552,6 +586,80 @@ where } } +fn write_page_setup(page_setup: &PageSetup, writer: &mut XmlWriter) -> std::io::Result<()> +where + X: Write, +{ + fn inches<'a>(x: f64) -> Cow<'a, str> { + Cow::from(format!("{:.2}in", x)) + } + + writer + .create_element("vps:pageSetup") + .with_attribute(( + "initial-page-number", + Cow::from(format!("{}", page_setup.initial_page_number)), + )) + .with_attribute(( + "chart-size", + match page_setup.chart_size { + super::page::ChartSize::AsIs => "as-is", + super::page::ChartSize::FullHeight => "full-height", + super::page::ChartSize::HalfHeight => "half-height", + super::page::ChartSize::QuarterHeight => "quarter-height", + }, + )) + .with_attribute(("margin-left", inches(page_setup.margins[Axis2::X][0]))) + .with_attribute(("margin-right", inches(page_setup.margins[Axis2::X][1]))) + .with_attribute(("margin-top", inches(page_setup.margins[Axis2::Y][0]))) + .with_attribute(("margin-bottom", inches(page_setup.margins[Axis2::Y][1]))) + .with_attribute(("paper-height", inches(page_setup.paper[Axis2::Y]))) + .with_attribute(("paper-width", inches(page_setup.paper[Axis2::X]))) + .with_attribute(( + "reference-orientation", + match page_setup.orientation { + crate::output::page::Orientation::Portrait => "portrait", + crate::output::page::Orientation::Landscape => "landscape", + }, + )) + .with_attribute(( + "space-after", + Cow::from(format!("{:.1}pt", page_setup.object_spacing * 72.0)), + )) + .write_inner_content(|w| { + write_page_heading(&page_setup.headings[0], "vps:pageHeader", w)?; + write_page_heading(&page_setup.headings[1], "vps:pageFooter", w)?; + Ok(()) + })?; + Ok(()) +} + +fn write_page_heading( + heading: &Heading, + name: &str, + writer: &mut XmlWriter, +) -> std::io::Result<()> +where + X: Write, +{ + let element = writer.create_element(name); + if !heading.0.is_empty() { + element.write_inner_content(|w| { + w.create_element("vps:pageParagraph") + .write_inner_content(|w| { + for paragraph in &heading.0 { + w.create_element("vtx:text") + .with_attribute(("text", "title")) + .write_text_content(BytesText::new(¶graph.markup))?; + } + Ok(()) + })?; + Ok(()) + })?; + } + Ok(()) +} + fn maybe_with_attribute<'a, 'b, W, I>( element: ElementWriter<'a, W>, attr: Option, diff --git a/rust/pspp/src/output/text.rs b/rust/pspp/src/output/text.rs index 5ef2f67090..61b49a357c 100644 --- a/rust/pspp/src/output/text.rs +++ b/rust/pspp/src/output/text.rs @@ -67,28 +67,19 @@ pub struct TextConfig { options: TextRendererOptions, } -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Default, Deserialize, Serialize)] +#[serde(default)] pub struct TextRendererOptions { /// Enable bold and underline in output? pub emphasis: bool, /// Page width. - pub width: usize, + pub width: Option, /// ASCII or Unicode pub boxes: Boxes, } -impl Default for TextRendererOptions { - fn default() -> Self { - Self { - emphasis: false, - width: usize::MAX, - boxes: Boxes::default(), - } - } -} - pub struct TextRenderer { /// Enable bold and underline in output? emphasis: bool, @@ -114,14 +105,15 @@ impl Default for TextRenderer { impl TextRenderer { pub fn new(config: &TextRendererOptions) -> Self { + let width = config.width.unwrap_or(usize::MAX); Self { emphasis: config.emphasis, - width: config.width, + width, min_hbreak: 20, box_chars: config.boxes.box_chars(), n_objects: 0, params: Params { - size: Coord2::new(config.width, usize::MAX), + size: Coord2::new(width, usize::MAX), font_size: EnumMap::from_fn(|_| 1), line_widths: EnumMap::from_fn(|stroke| if stroke == Stroke::None { 0 } else { 1 }), px_size: None, diff --git a/rust/pspp/src/sys/cooked.rs b/rust/pspp/src/sys/cooked.rs index 7764b21c99..0e7f87c5fb 100644 --- a/rust/pspp/src/sys/cooked.rs +++ b/rust/pspp/src/sys/cooked.rs @@ -34,7 +34,7 @@ use crate::{ format::{Error as FormatError, Format, UncheckedFormat}, hexfloat::HexFloat, identifier::{Error as IdError, Identifier}, - output::pivot::{Group, Value}, + output::pivot::{Axis3, Dimension, Group, PivotTable, Value}, sys::{ raw::{ self, infer_encoding, @@ -1471,6 +1471,16 @@ impl Metadata { (group, values) } + pub fn to_pivot_table(&self) -> PivotTable { + let (group, data) = self.to_pivot_rows(); + PivotTable::new([(Axis3::Y, Dimension::new(group))]).with_data( + data.into_iter() + .enumerate() + .filter(|(_row, value)| !value.is_empty()) + .map(|(row, value)| ([row], value)), + ) + } + fn decode(header: &FileHeader, headers: &Records, mut warn: impl FnMut(Error)) -> Self { let header = &header; let creation_date = NaiveDate::parse_from_str(&header.creation_date, "%e %b %y") diff --git a/rust/pspp/src/sys/test.rs b/rust/pspp/src/sys/test.rs index 5ddf745f17..dc19b6499f 100644 --- a/rust/pspp/src/sys/test.rs +++ b/rust/pspp/src/sys/test.rs @@ -23,6 +23,7 @@ use std::{ use binrw::Endian; use encoding_rs::UTF_8; +use itertools::Itertools; use crate::{ crypto::EncryptedFile, @@ -573,102 +574,104 @@ fn encrypted_file_without_password() { /// Tests the most basic kind of writing a system file, just writing a few /// numeric variables and cases. -#[test] -fn write_numeric() { - for (compression, compression_string) in [ - (None, "uncompressed"), - (Some(Compression::Simple), "simple"), - (Some(Compression::ZLib), "zlib"), +fn write_numeric(compression: Option, compression_string: &str) { + let mut dictionary = Dictionary::new(UTF_8); + for i in 0..4 { + let name = Identifier::new(format!("variable{i}")).unwrap(); + dictionary + .add_var(Variable::new(name, VarWidth::Numeric, UTF_8)) + .unwrap(); + } + let mut cases = WriteOptions::reproducible(compression) + .write_writer(&dictionary, Cursor::new(Vec::new())) + .unwrap(); + for case in [ + [1, 1, 1, 2], + [1, 1, 2, 30], + [1, 2, 1, 8], + [1, 2, 2, 20], + [2, 1, 1, 2], + [2, 1, 2, 22], + [2, 2, 1, 1], + [2, 2, 2, 3], ] { - let mut dictionary = Dictionary::new(UTF_8); - for i in 0..4 { - let name = Identifier::new(format!("variable{i}")).unwrap(); - dictionary - .add_var(Variable::new(name, VarWidth::Numeric, UTF_8)) - .unwrap(); - } - let mut cases = WriteOptions::reproducible(compression) - .write_writer(&dictionary, Cursor::new(Vec::new())) + cases + .write_case( + case.into_iter() + .map(|number| Datum::<&str>::Number(Some(number as f64))), + ) .unwrap(); - for case in [ - [1, 1, 1, 2], - [1, 1, 2, 30], - [1, 2, 1, 8], - [1, 2, 2, 20], - [2, 1, 1, 2], - [2, 1, 2, 22], - [2, 2, 1, 1], - [2, 2, 2, 3], - ] { - cases - .write_case( - case.into_iter() - .map(|number| Datum::<&str>::Number(Some(number as f64))), - ) - .unwrap(); - } - let sysfile = cases.finish().unwrap().unwrap().into_inner(); - let expected_filename = PathBuf::from(&format!( - "src/sys/testdata/write-numeric-{compression_string}.expected" - )); - let expected = String::from_utf8(std::fs::read(&expected_filename).unwrap()).unwrap(); - test_sysfile(Cursor::new(sysfile), &expected, &expected_filename); } + let sysfile = cases.finish().unwrap().unwrap().into_inner(); + let expected_filename = PathBuf::from(&format!( + "src/sys/testdata/write-numeric-{compression_string}.expected" + )); + let expected = String::from_utf8(std::fs::read(&expected_filename).unwrap()).unwrap(); + test_sysfile(Cursor::new(sysfile), &expected, &expected_filename); } -/// Tests writing string data. #[test] -fn write_string_data() { - for (compression, compression_string) in [ - (None, "uncompressed"), - (Some(Compression::Simple), "simple"), - (Some(Compression::ZLib), "zlib"), - ] { - let mut dictionary = Dictionary::new(UTF_8); - dictionary - .add_var(Variable::new( - Identifier::new("s1").unwrap(), - VarWidth::String(1), - UTF_8, - )) - .unwrap(); +fn write_numeric_uncompressed() { + write_numeric(None, "uncompressed"); +} - dictionary - .add_var(Variable::new( - Identifier::new("s2").unwrap(), - VarWidth::String(2), - UTF_8, - )) - .unwrap(); +#[test] +fn write_numeric_simple() { + write_numeric(Some(Compression::Simple), "simple"); +} - dictionary - .add_var(Variable::new( - Identifier::new("s3").unwrap(), - VarWidth::String(3), - UTF_8, - )) - .unwrap(); +#[test] +fn write_numeric_zlib() { + write_numeric(Some(Compression::ZLib), "zlib"); +} - dictionary - .add_var(Variable::new( - Identifier::new("s4").unwrap(), - VarWidth::String(9), - UTF_8, - )) - .unwrap(); +/// Tests writing string data. +fn write_string(compression: Option, compression_string: &str) { + let mut dictionary = Dictionary::new(UTF_8); + dictionary + .add_var(Variable::new( + Identifier::new("s1").unwrap(), + VarWidth::String(1), + UTF_8, + )) + .unwrap(); - dictionary - .add_var(Variable::new( - Identifier::new("s566").unwrap(), - VarWidth::String(566), - UTF_8, - )) - .unwrap(); + dictionary + .add_var(Variable::new( + Identifier::new("s2").unwrap(), + VarWidth::String(2), + UTF_8, + )) + .unwrap(); - let mut cases = WriteOptions::reproducible(compression) - .write_writer(&dictionary, Cursor::new(Vec::new())) - .unwrap(); - for case in [ + dictionary + .add_var(Variable::new( + Identifier::new("s3").unwrap(), + VarWidth::String(3), + UTF_8, + )) + .unwrap(); + + dictionary + .add_var(Variable::new( + Identifier::new("s4").unwrap(), + VarWidth::String(9), + UTF_8, + )) + .unwrap(); + + dictionary + .add_var(Variable::new( + Identifier::new("s566").unwrap(), + VarWidth::String(566), + UTF_8, + )) + .unwrap(); + + let mut cases = WriteOptions::reproducible(compression) + .write_writer(&dictionary, Cursor::new(Vec::new())) + .unwrap(); + for case in [ ["1", "1", "1", "xyzzyquux", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\n"], ["1", "2", "1", "8", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"], ] { @@ -676,13 +679,27 @@ fn write_string_data() { .write_case(case.into_iter().map(|s| Datum::String(s))) .unwrap(); } - let sysfile = cases.finish().unwrap().unwrap().into_inner(); - let expected_filename = PathBuf::from(&format!( - "src/sys/testdata/write-string-{compression_string}.expected" - )); - let expected = String::from_utf8(std::fs::read(&expected_filename).unwrap()).unwrap(); - test_sysfile(Cursor::new(sysfile), &expected, &expected_filename); - } + let sysfile = cases.finish().unwrap().unwrap().into_inner(); + let expected_filename = PathBuf::from(&format!( + "src/sys/testdata/write-string-{compression_string}.expected" + )); + let expected = String::from_utf8(std::fs::read(&expected_filename).unwrap()).unwrap(); + test_sysfile(Cursor::new(sysfile), &expected, &expected_filename); +} + +#[test] +fn write_string_uncompressed() { + write_string(None, "uncompressed"); +} + +#[test] +fn write_string_simple() { + write_string(Some(Compression::Simple), "simple"); +} + +#[test] +fn write_string_zlib() { + write_string(Some(Compression::ZLib), "zlib"); } fn test_raw_sysfile(name: &str) { @@ -736,43 +753,15 @@ where let output = match ReadOptions::new(|warning| warnings.push(warning)).open_reader(sysfile) { Ok(system_file) => { let (dictionary, metadata, cases) = system_file.into_parts(); - let (group, data) = metadata.to_pivot_rows(); - let metadata_table = PivotTable::new([(Axis3::Y, Dimension::new(group))]).with_data( - data.into_iter() - .enumerate() - .filter(|(_row, value)| !value.is_empty()) - .map(|(row, value)| ([row], value)), - ); - let (group, data) = dictionary.to_pivot_rows(); - let dictionary_table = PivotTable::new([(Axis3::Y, Dimension::new(group))]).with_data( - data.into_iter() - .enumerate() - .filter(|(_row, value)| !value.is_empty()) - .map(|(row, value)| ([row], value)), - ); + let mut output = Vec::new(); output.extend( warnings .into_iter() - .map(|warning| Arc::new(Item::from(Text::new_log(warning.to_string())))), + .map(|warning| Item::from(Text::new_log(warning.to_string()))), ); - output.push(Arc::new(metadata_table.into())); - output.push(Arc::new(dictionary_table.into())); - output.push(Arc::new( - dictionary.output_variables().to_pivot_table().into(), - )); - if let Some(pt) = dictionary.output_value_labels().to_pivot_table() { - output.push(Arc::new(pt.into())); - } - if let Some(pt) = dictionary.output_mrsets().to_pivot_table() { - output.push(Arc::new(pt.into())); - } - if let Some(pt) = dictionary.output_attributes().to_pivot_table() { - output.push(Arc::new(pt.into())); - } - if let Some(pt) = dictionary.output_variable_sets().to_pivot_table() { - output.push(Arc::new(pt.into())); - } + output.push(metadata.to_pivot_table().into()); + output.extend(dictionary.all_pivot_tables().into_iter().map_into()); let variables = Group::new("Variable").with_multiple(dictionary.variables.iter().map(|var| &**var)); let mut case_numbers = Group::new("Case").with_label_shown(); @@ -789,7 +778,7 @@ where ); } Err(error) => { - output.push(Arc::new(Item::from(Text::new_log(error.to_string())))); + output.push(Item::from(Text::new_log(error.to_string()))); } } } @@ -803,9 +792,9 @@ where pt.insert(&[column_number, row_number], datum); } } - output.push(Arc::new(pt.into())); + output.push(pt.into()); } - Item::new(Details::Group(output)) + Item::new(Details::Group(output.into_iter().map(Arc::new).collect())) } Err(error) => Item::new(Details::Text(Box::new(Text::new_log(error.to_string())))), }; diff --git a/rust/pspp/src/sys/testdata/attributes.expected b/rust/pspp/src/sys/testdata/attributes.expected index f0daafed95..542ee2461f 100644 --- a/rust/pspp/src/sys/testdata/attributes.expected +++ b/rust/pspp/src/sys/testdata/attributes.expected @@ -13,6 +13,7 @@ │Variables│ 3│ ╰─────────┴────────────────────────╯ + Variables ╭──────────────┬────────┬─────┬─────────────────┬──────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role │Width│Alignment│Print Format│Write Format│Missing Values│ ├──────────────┼────────┼─────┼─────────────────┼──────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/bad_machine_float_info_size.expected b/rust/pspp/src/sys/testdata/bad_machine_float_info_size.expected index d2542a1194..b09ef9aa98 100644 --- a/rust/pspp/src/sys/testdata/bad_machine_float_info_size.expected +++ b/rust/pspp/src/sys/testdata/bad_machine_float_info_size.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0x100: In extension record: floating point recor │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/bad_machine_integer_info_count.expected b/rust/pspp/src/sys/testdata/bad_machine_integer_info_count.expected index 0587a131f8..c6e81da688 100644 --- a/rust/pspp/src/sys/testdata/bad_machine_integer_info_count.expected +++ b/rust/pspp/src/sys/testdata/bad_machine_integer_info_count.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0x104: In extension record: integer record has b │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/bad_machine_integer_info_endianness.expected b/rust/pspp/src/sys/testdata/bad_machine_integer_info_endianness.expected index e66463ad12..ca0229447c 100644 --- a/rust/pspp/src/sys/testdata/bad_machine_integer_info_endianness.expected +++ b/rust/pspp/src/sys/testdata/bad_machine_integer_info_endianness.expected @@ -14,6 +14,7 @@ Integer format indicated by system file (3) differs from expected ({endian}). │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/bad_machine_integer_info_float_format.expected b/rust/pspp/src/sys/testdata/bad_machine_integer_info_float_format.expected index d25902e584..f040255705 100644 --- a/rust/pspp/src/sys/testdata/bad_machine_integer_info_float_format.expected +++ b/rust/pspp/src/sys/testdata/bad_machine_integer_info_float_format.expected @@ -14,6 +14,7 @@ Floating-point representation indicated by system file (2) differs from expected │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/bad_variable_name_in_long_string_value_label.expected b/rust/pspp/src/sys/testdata/bad_variable_name_in_long_string_value_label.expected index 0f9a086b6c..d276b3a58c 100644 --- a/rust/pspp/src/sys/testdata/bad_variable_name_in_long_string_value_label.expected +++ b/rust/pspp/src/sys/testdata/bad_variable_name_in_long_string_value_label.expected @@ -15,6 +15,7 @@ Ignoring long string value label for numeric variable NUM1. │Variables│2│ ╰─────────┴─╯ + Variables ╭─────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/bad_variable_name_in_variable_value_pair.expected b/rust/pspp/src/sys/testdata/bad_variable_name_in_variable_value_pair.expected index 13d3fb715e..673e178210 100644 --- a/rust/pspp/src/sys/testdata/bad_variable_name_in_variable_value_pair.expected +++ b/rust/pspp/src/sys/testdata/bad_variable_name_in_variable_value_pair.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe5: In long variable name record: Missing `=` │Variables│1│ ╰─────────┴─╯ + Variables ╭────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/bad_very_long_string_length.expected b/rust/pspp/src/sys/testdata/bad_very_long_string_length.expected index 31dafee3ba..7d391c0323 100644 --- a/rust/pspp/src/sys/testdata/bad_very_long_string_length.expected +++ b/rust/pspp/src/sys/testdata/bad_very_long_string_length.expected @@ -17,6 +17,7 @@ Variable with short name NUM1 listed in very long string record with width 256 r │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/bad_very_long_string_segment_width.expected b/rust/pspp/src/sys/testdata/bad_very_long_string_segment_width.expected index 75d706ab95..6ba24735bd 100644 --- a/rust/pspp/src/sys/testdata/bad_very_long_string_segment_width.expected +++ b/rust/pspp/src/sys/testdata/bad_very_long_string_segment_width.expected @@ -15,6 +15,7 @@ Variable with short name STR1 listed in very long string record with width 256 h │Variables│2│ ╰─────────┴─╯ + Variables ╭──────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/compressed_data.expected b/rust/pspp/src/sys/testdata/compressed_data.expected index 624955c00d..1cf5d48e0f 100644 --- a/rust/pspp/src/sys/testdata/compressed_data.expected +++ b/rust/pspp/src/sys/testdata/compressed_data.expected @@ -12,6 +12,7 @@ │Variables│ 5│ ╰─────────┴────────────────────────╯ + Variables ╭─────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/compressed_data_other_bias.expected b/rust/pspp/src/sys/testdata/compressed_data_other_bias.expected index 21cd534702..372a7f9654 100644 --- a/rust/pspp/src/sys/testdata/compressed_data_other_bias.expected +++ b/rust/pspp/src/sys/testdata/compressed_data_other_bias.expected @@ -14,6 +14,7 @@ Warning at file offsets 0x54 to 0x5c: In file header: Compression bias is 50 ins │Variables│ 5│ ╰─────────┴────────────────────────╯ + Variables ╭─────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/compressed_data_zero_bias.expected b/rust/pspp/src/sys/testdata/compressed_data_zero_bias.expected index 96d6e5ac76..9d6989cdf7 100644 --- a/rust/pspp/src/sys/testdata/compressed_data_zero_bias.expected +++ b/rust/pspp/src/sys/testdata/compressed_data_zero_bias.expected @@ -12,6 +12,7 @@ │Variables│ 5│ ╰─────────┴────────────────────────╯ + Variables ╭─────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/documents.expected b/rust/pspp/src/sys/testdata/documents.expected index 42cc6e4c04..762e204069 100644 --- a/rust/pspp/src/sys/testdata/documents.expected +++ b/rust/pspp/src/sys/testdata/documents.expected @@ -17,6 +17,7 @@ │ │Last line of documents │ ╰─────────┴───────────────────────────────────────────────────────╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/duplicate_attribute_name.expected b/rust/pspp/src/sys/testdata/duplicate_attribute_name.expected index 3a70ef81ca..05fe2754ac 100644 --- a/rust/pspp/src/sys/testdata/duplicate_attribute_name.expected +++ b/rust/pspp/src/sys/testdata/duplicate_attribute_name.expected @@ -15,6 +15,7 @@ Warning at file offsets 0x10e to 0x12d: In file or variable attribute record: Du │Variables│1│ ╰─────────┴─╯ + Variables ╭────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/duplicate_long_variable_name.expected b/rust/pspp/src/sys/testdata/duplicate_long_variable_name.expected index 6f17a31f67..a169e66ead 100644 --- a/rust/pspp/src/sys/testdata/duplicate_long_variable_name.expected +++ b/rust/pspp/src/sys/testdata/duplicate_long_variable_name.expected @@ -19,6 +19,7 @@ Duplicate long variable name LONGVARIABLENAME. │Variables│4│ ╰─────────┴─╯ + Variables ╭────────────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────────────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/duplicate_value_labels_type.expected b/rust/pspp/src/sys/testdata/duplicate_value_labels_type.expected index e6416d44f3..5552bcc73c 100644 --- a/rust/pspp/src/sys/testdata/duplicate_value_labels_type.expected +++ b/rust/pspp/src/sys/testdata/duplicate_value_labels_type.expected @@ -15,6 +15,7 @@ NUM1 has duplicate value labels for the following value(s): 1 │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/duplicate_variable_name.expected b/rust/pspp/src/sys/testdata/duplicate_variable_name.expected index ac64a478c3..581bcf61d9 100644 --- a/rust/pspp/src/sys/testdata/duplicate_variable_name.expected +++ b/rust/pspp/src/sys/testdata/duplicate_variable_name.expected @@ -13,6 +13,7 @@ Renaming variable with duplicate name VAR1 to VAR001. │Variables│2│ ╰─────────┴─╯ + Variables ╭──────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/empty_document_record.expected b/rust/pspp/src/sys/testdata/empty_document_record.expected index 47d2fac4a4..0bf233ca67 100644 --- a/rust/pspp/src/sys/testdata/empty_document_record.expected +++ b/rust/pspp/src/sys/testdata/empty_document_record.expected @@ -13,6 +13,7 @@ │Variables│ 1│ ╰─────────┴────────────────────────╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/extra_product_info.expected b/rust/pspp/src/sys/testdata/extra_product_info.expected index 63ef54fde9..f5d25a70dd 100644 --- a/rust/pspp/src/sys/testdata/extra_product_info.expected +++ b/rust/pspp/src/sys/testdata/extra_product_info.expected @@ -16,6 +16,7 @@ │Variables│ 4│ ╰─────────┴──────────────╯ + Variables ╭─┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/fewer_data_records_than_indicated_by_file_header.expected b/rust/pspp/src/sys/testdata/fewer_data_records_than_indicated_by_file_header.expected index 41eca0a266..70c4d64598 100644 --- a/rust/pspp/src/sys/testdata/fewer_data_records_than_indicated_by_file_header.expected +++ b/rust/pspp/src/sys/testdata/fewer_data_records_than_indicated_by_file_header.expected @@ -11,6 +11,7 @@ │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/integer_overflows_in_long_string_missing_values.expected b/rust/pspp/src/sys/testdata/integer_overflows_in_long_string_missing_values.expected index ea2d86612b..8b1faeb1aa 100644 --- a/rust/pspp/src/sys/testdata/integer_overflows_in_long_string_missing_values.expected +++ b/rust/pspp/src/sys/testdata/integer_overflows_in_long_string_missing_values.expected @@ -18,6 +18,7 @@ This system file does not indicate its own character encoding. For best results │Variables│4│ ╰─────────┴─╯ + Variables ╭────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/invalid_long_string_missing_values.expected b/rust/pspp/src/sys/testdata/invalid_long_string_missing_values.expected index 654448b131..086d49847e 100644 --- a/rust/pspp/src/sys/testdata/invalid_long_string_missing_values.expected +++ b/rust/pspp/src/sys/testdata/invalid_long_string_missing_values.expected @@ -25,6 +25,7 @@ Invalid long string missing value for 7-byte string variable STR4. │Variables│ 5│ ╰─────────┴──────────────────────────────╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────────────────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│ Missing Values │ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────────────────────────┤ diff --git a/rust/pspp/src/sys/testdata/invalid_variable_format.expected b/rust/pspp/src/sys/testdata/invalid_variable_format.expected index 9969410ab1..05d55df674 100644 --- a/rust/pspp/src/sys/testdata/invalid_variable_format.expected +++ b/rust/pspp/src/sys/testdata/invalid_variable_format.expected @@ -27,6 +27,7 @@ Substituting A4 for invalid write format on variable STR2. String variable with │Variables│4│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/invalid_variable_name.expected b/rust/pspp/src/sys/testdata/invalid_variable_name.expected index 9ac792f6ba..ee97fa6706 100644 --- a/rust/pspp/src/sys/testdata/invalid_variable_name.expected +++ b/rust/pspp/src/sys/testdata/invalid_variable_name.expected @@ -19,6 +19,7 @@ │Variables│4│ ╰─────────┴─╯ + Variables ╭──────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/long_variable_names.expected b/rust/pspp/src/sys/testdata/long_variable_names.expected index 23b123429a..88dde68c52 100644 --- a/rust/pspp/src/sys/testdata/long_variable_names.expected +++ b/rust/pspp/src/sys/testdata/long_variable_names.expected @@ -13,6 +13,7 @@ │Variables│ 7│ ╰─────────┴────────────────────────╯ + Variables ╭─────────────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────────────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/missing_attribute_value.expected b/rust/pspp/src/sys/testdata/missing_attribute_value.expected index 141a5a0bc7..90adcda997 100644 --- a/rust/pspp/src/sys/testdata/missing_attribute_value.expected +++ b/rust/pspp/src/sys/testdata/missing_attribute_value.expected @@ -15,6 +15,7 @@ Warning at file offsets 0xf6 to 0x109: In file or variable attribute record: Att │Variables│1│ ╰─────────┴─╯ + Variables ╭────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/missing_newline_after_variable_name_in_mrsets.expected b/rust/pspp/src/sys/testdata/missing_newline_after_variable_name_in_mrsets.expected index ca1145046a..7aef1fdfec 100644 --- a/rust/pspp/src/sys/testdata/missing_newline_after_variable_name_in_mrsets.expected +++ b/rust/pspp/src/sys/testdata/missing_newline_after_variable_name_in_mrsets.expected @@ -13,6 +13,7 @@ Multiple response set $a has only one variable. │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/missing_string_continuation.expected b/rust/pspp/src/sys/testdata/missing_string_continuation.expected index 3bb98b0f40..6630473a18 100644 --- a/rust/pspp/src/sys/testdata/missing_string_continuation.expected +++ b/rust/pspp/src/sys/testdata/missing_string_continuation.expected @@ -13,6 +13,7 @@ Variable index 0 is a 10-byte string that should be followed by long string cont │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/mixed_variable_types_in_mrsets.expected b/rust/pspp/src/sys/testdata/mixed_variable_types_in_mrsets.expected index b9a1e3a4c3..4c86e6f7ca 100644 --- a/rust/pspp/src/sys/testdata/mixed_variable_types_in_mrsets.expected +++ b/rust/pspp/src/sys/testdata/mixed_variable_types_in_mrsets.expected @@ -13,6 +13,7 @@ Multiple response set $a contains both string and numeric variables. │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/more_data_records_than_indicated_by_file_header.expected b/rust/pspp/src/sys/testdata/more_data_records_than_indicated_by_file_header.expected index cbe0398bf4..16d81d3cc7 100644 --- a/rust/pspp/src/sys/testdata/more_data_records_than_indicated_by_file_header.expected +++ b/rust/pspp/src/sys/testdata/more_data_records_than_indicated_by_file_header.expected @@ -11,6 +11,7 @@ │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_documents_records.expected b/rust/pspp/src/sys/testdata/multiple_documents_records.expected index 414d01908c..2f45331637 100644 --- a/rust/pspp/src/sys/testdata/multiple_documents_records.expected +++ b/rust/pspp/src/sys/testdata/multiple_documents_records.expected @@ -13,6 +13,7 @@ │ │One line of documents│ ╰─────────┴─────────────────────╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets.expected b/rust/pspp/src/sys/testdata/multiple_response_sets.expected index 47c8a9b46c..07b7cf2839 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets.expected @@ -13,6 +13,7 @@ │Variables│ 16│ ╰─────────┴────────────────────────╯ + Variables ╭──┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_bad_counted_string.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_bad_counted_string.expected index 9b849999e5..e418bef4cc 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_bad_counted_string.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_bad_counted_string.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe5: In multiple response set record: Syntax er │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_bad_name.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_bad_name.expected index 6793e1b229..9635997a71 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_bad_name.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_bad_name.expected @@ -17,6 +17,7 @@ Invalid multiple response set name. Multiple response set name "e" does not beg │Variables│ 16│ ╰─────────┴────────────────────────╯ + Variables ╭──┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_counted_string_bad_length.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_counted_string_bad_length.expected index 8fb97dbb0c..9d0a063f51 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_counted_string_bad_length.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_counted_string_bad_length.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe9: In multiple response set record: Syntax er │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_counted_string_missing_space.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_counted_string_missing_space.expected index f6e6e03234..8cbd13cc55 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_counted_string_missing_space.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_counted_string_missing_space.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe6: In multiple response set record: Syntax er │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_duplicate_variable_name.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_duplicate_variable_name.expected index e5a0854dc6..a43645718e 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_duplicate_variable_name.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_duplicate_variable_name.expected @@ -15,6 +15,7 @@ Multiple response set $a has only one variable. │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_label_source.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_label_source.expected index fe138f630b..9212037f06 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_label_source.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_label_source.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe5: In multiple response set record: Invalid m │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_newline_after_variable_name.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_newline_after_variable_name.expected index d4c8ec03cb..a4535ccd20 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_newline_after_variable_name.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_newline_after_variable_name.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xec: In multiple response set record: Syntax er │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_c.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_c.expected index 5c60f29d73..beca7dd9f0 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_c.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_c.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe5: In multiple response set record: Syntax er │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_counted_string.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_counted_string.expected index 05d8d77537..bdaee73a02 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_counted_string.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_counted_string.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xea: In multiple response set record: Syntax er │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_e.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_e.expected index fe138f630b..9212037f06 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_e.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_missing_space_after_e.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe5: In multiple response set record: Invalid m │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/multiple_response_sets_unexpected_label_source.expected b/rust/pspp/src/sys/testdata/multiple_response_sets_unexpected_label_source.expected index 4b0d62e285..c71d6c8949 100644 --- a/rust/pspp/src/sys/testdata/multiple_response_sets_unexpected_label_source.expected +++ b/rust/pspp/src/sys/testdata/multiple_response_sets_unexpected_label_source.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe6: In multiple response set record: Invalid m │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/no_variables.expected b/rust/pspp/src/sys/testdata/no_variables.expected index b10e8d94b3..3580af6a4b 100644 --- a/rust/pspp/src/sys/testdata/no_variables.expected +++ b/rust/pspp/src/sys/testdata/no_variables.expected @@ -12,3 +12,4 @@ │Variables│ 0│ ╰─────────┴────────────────────────╯ + Variables diff --git a/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected b/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected index 64940a3880..5359293d07 100644 --- a/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected +++ b/rust/pspp/src/sys/testdata/null_dereference_skipping_bad_extension_record_18.expected @@ -15,6 +15,7 @@ This system file does not indicate its own character encoding. For best results │Variables│4│ ╰─────────┴─╯ + Variables ╭────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/partial_compressed_data_record.expected b/rust/pspp/src/sys/testdata/partial_compressed_data_record.expected index d0cc32ccf9..fb10a7bff6 100644 --- a/rust/pspp/src/sys/testdata/partial_compressed_data_record.expected +++ b/rust/pspp/src/sys/testdata/partial_compressed_data_record.expected @@ -12,6 +12,7 @@ │Variables│ 5│ ╰─────────┴────────────────────────╯ + Variables ╭─────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/partial_data_record_between_variables.expected b/rust/pspp/src/sys/testdata/partial_data_record_between_variables.expected index 813c06e834..df8ecd7128 100644 --- a/rust/pspp/src/sys/testdata/partial_data_record_between_variables.expected +++ b/rust/pspp/src/sys/testdata/partial_data_record_between_variables.expected @@ -11,6 +11,7 @@ │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/partial_data_record_within_long_string.expected b/rust/pspp/src/sys/testdata/partial_data_record_within_long_string.expected index b1c0844998..b0754f43a0 100644 --- a/rust/pspp/src/sys/testdata/partial_data_record_within_long_string.expected +++ b/rust/pspp/src/sys/testdata/partial_data_record_within_long_string.expected @@ -11,6 +11,7 @@ │Variables│1│ ╰─────────┴─╯ + Variables ╭─────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/test-encrypted.expected b/rust/pspp/src/sys/testdata/test-encrypted.expected index e98ba62f71..9ec16fbd07 100644 --- a/rust/pspp/src/sys/testdata/test-encrypted.expected +++ b/rust/pspp/src/sys/testdata/test-encrypted.expected @@ -12,6 +12,7 @@ │Variables│5│ ╰─────────┴─╯ + Variables ╭────────────────────────────────────────────────────┬────────┬────────────────────────────────────────────────────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│ Label │Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────────────────────────────────────────────────────┼────────┼────────────────────────────────────────────────────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/type_4_record_names_long_string_variable.expected b/rust/pspp/src/sys/testdata/type_4_record_names_long_string_variable.expected index ba37a94432..c91be624b3 100644 --- a/rust/pspp/src/sys/testdata/type_4_record_names_long_string_variable.expected +++ b/rust/pspp/src/sys/testdata/type_4_record_names_long_string_variable.expected @@ -13,6 +13,7 @@ At offsets 0xf4...0x114, record types 3 and 4 may not add value labels to one or │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/unknown_encoding.expected b/rust/pspp/src/sys/testdata/unknown_encoding.expected index a02e3abb6a..3d620f7241 100644 --- a/rust/pspp/src/sys/testdata/unknown_encoding.expected +++ b/rust/pspp/src/sys/testdata/unknown_encoding.expected @@ -16,6 +16,7 @@ Text string contains invalid bytes for UTF-8 encoding: "PSPP synthetic test file │Variables│ 4│ ╰─────────┴──────────────────────────────╯ + Variables ╭─┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/unknown_extension_record.expected b/rust/pspp/src/sys/testdata/unknown_extension_record.expected index 3d4be23ca9..bf775efd47 100644 --- a/rust/pspp/src/sys/testdata/unknown_extension_record.expected +++ b/rust/pspp/src/sys/testdata/unknown_extension_record.expected @@ -13,6 +13,7 @@ Unknown extension record with subtype 30 at offset 0xe0, consisting of 1 1-byte │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/unquoted_attribute_value.expected b/rust/pspp/src/sys/testdata/unquoted_attribute_value.expected index 5a45874292..5d5a5c8159 100644 --- a/rust/pspp/src/sys/testdata/unquoted_attribute_value.expected +++ b/rust/pspp/src/sys/testdata/unquoted_attribute_value.expected @@ -15,6 +15,7 @@ Warning at file offsets 0xfd to 0x10f: In file or variable attribute record: Att │Variables│1│ ╰─────────┴─╯ + Variables ╭────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/unspecified_number_of_variable_positions.expected b/rust/pspp/src/sys/testdata/unspecified_number_of_variable_positions.expected index 12cfebb0c6..ed9a324b8f 100644 --- a/rust/pspp/src/sys/testdata/unspecified_number_of_variable_positions.expected +++ b/rust/pspp/src/sys/testdata/unspecified_number_of_variable_positions.expected @@ -12,6 +12,7 @@ │Variables│ 2│ ╰─────────┴────────────────────────╯ + Variables ╭──────────────────────────┬────────┬──────────────────────────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│ Label │Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──────────────────────────┼────────┼──────────────────────────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/value_label_variable_indexes_must_be_in_correct_range.expected b/rust/pspp/src/sys/testdata/value_label_variable_indexes_must_be_in_correct_range.expected index 8469f599a8..ceb9b71ee6 100644 --- a/rust/pspp/src/sys/testdata/value_label_variable_indexes_must_be_in_correct_range.expected +++ b/rust/pspp/src/sys/testdata/value_label_variable_indexes_must_be_in_correct_range.expected @@ -17,6 +17,7 @@ Warning at file offsets 0x160 to 0x168: In value label record: One or more varia │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/value_label_variable_indexes_must_not_be_long_string_continuation.expected b/rust/pspp/src/sys/testdata/value_label_variable_indexes_must_not_be_long_string_continuation.expected index 54880f8648..67c64a991e 100644 --- a/rust/pspp/src/sys/testdata/value_label_variable_indexes_must_not_be_long_string_continuation.expected +++ b/rust/pspp/src/sys/testdata/value_label_variable_indexes_must_not_be_long_string_continuation.expected @@ -13,6 +13,7 @@ Warning at file offsets 0x110 to 0x114: In value label record: One or more varia │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/value_label_with_no_associated_variables.expected b/rust/pspp/src/sys/testdata/value_label_with_no_associated_variables.expected index 1230c0a499..91ea4380dd 100644 --- a/rust/pspp/src/sys/testdata/value_label_with_no_associated_variables.expected +++ b/rust/pspp/src/sys/testdata/value_label_with_no_associated_variables.expected @@ -15,6 +15,7 @@ This system file does not indicate its own character encoding. For best results │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/value_labels.expected b/rust/pspp/src/sys/testdata/value_labels.expected index 54bd0ec5f0..8f865a90ee 100644 --- a/rust/pspp/src/sys/testdata/value_labels.expected +++ b/rust/pspp/src/sys/testdata/value_labels.expected @@ -13,6 +13,7 @@ │Variables│ 17│ ╰─────────┴────────────────────────╯ + Variables ╭─────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/variable_display_with_width.expected b/rust/pspp/src/sys/testdata/variable_display_with_width.expected index a90f718cbf..898c8350f2 100644 --- a/rust/pspp/src/sys/testdata/variable_display_with_width.expected +++ b/rust/pspp/src/sys/testdata/variable_display_with_width.expected @@ -12,6 +12,7 @@ │Variables│ 12│ ╰─────────┴────────────────────────╯ + Variables ╭─┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/variable_display_without_width.expected b/rust/pspp/src/sys/testdata/variable_display_without_width.expected index 97aa90c9ea..e810dcd53f 100644 --- a/rust/pspp/src/sys/testdata/variable_display_without_width.expected +++ b/rust/pspp/src/sys/testdata/variable_display_without_width.expected @@ -12,6 +12,7 @@ │Variables│ 12│ ╰─────────┴────────────────────────╯ + Variables ╭─┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/variable_labels_and_missing_values.expected b/rust/pspp/src/sys/testdata/variable_labels_and_missing_values.expected index 2648723946..6d6b7a751d 100644 --- a/rust/pspp/src/sys/testdata/variable_labels_and_missing_values.expected +++ b/rust/pspp/src/sys/testdata/variable_labels_and_missing_values.expected @@ -13,6 +13,7 @@ │Variables│ 21│ ╰─────────┴──────────────────────────────╯ + Variables ╭────────────────────────────────┬────────┬────────────────────────────────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬───────────────────────────╮ │ │Position│ Label │Measurement Level│ Role│Width│Alignment│Print Format│Write Format│ Missing Values │ ├────────────────────────────────┼────────┼────────────────────────────────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼───────────────────────────┤ diff --git a/rust/pspp/src/sys/testdata/variable_roles.expected b/rust/pspp/src/sys/testdata/variable_roles.expected index ce3c4cc80f..4bd3a7647e 100644 --- a/rust/pspp/src/sys/testdata/variable_roles.expected +++ b/rust/pspp/src/sys/testdata/variable_roles.expected @@ -15,6 +15,7 @@ Unknown role "6". │Variables│ 7│ ╰─────────┴────────────────────────╯ + Variables ╭─┬────────┬─────┬─────────────────┬─────────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role │Width│Alignment│Print Format│Write Format│Missing Values│ ├─┼────────┼─────┼─────────────────┼─────────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/variable_sets.expected b/rust/pspp/src/sys/testdata/variable_sets.expected index 982db894ea..f257f41e7e 100644 --- a/rust/pspp/src/sys/testdata/variable_sets.expected +++ b/rust/pspp/src/sys/testdata/variable_sets.expected @@ -13,6 +13,7 @@ │Variables│ 10│ ╰─────────┴────────────────────────╯ + Variables ╭──┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/variable_sets_unknown_variable.expected b/rust/pspp/src/sys/testdata/variable_sets_unknown_variable.expected index bf63c319e6..1a86dade44 100644 --- a/rust/pspp/src/sys/testdata/variable_sets_unknown_variable.expected +++ b/rust/pspp/src/sys/testdata/variable_sets_unknown_variable.expected @@ -17,6 +17,7 @@ Variable set "vs2" includes unknown variable foo. │Variables│ 10│ ╰─────────┴────────────────────────╯ + Variables ╭──┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/variables_for_value_label_must_all_be_same_type.expected b/rust/pspp/src/sys/testdata/variables_for_value_label_must_all_be_same_type.expected index 0723dc8d92..6ffdf78056 100644 --- a/rust/pspp/src/sys/testdata/variables_for_value_label_must_all_be_same_type.expected +++ b/rust/pspp/src/sys/testdata/variables_for_value_label_must_all_be_same_type.expected @@ -13,6 +13,7 @@ Warning at file offsets 0x110 to 0x118: In value label record: First variable in │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/very_long_strings.expected b/rust/pspp/src/sys/testdata/very_long_strings.expected index 3024855129..35b06625cb 100644 --- a/rust/pspp/src/sys/testdata/very_long_strings.expected +++ b/rust/pspp/src/sys/testdata/very_long_strings.expected @@ -13,6 +13,7 @@ │Variables│ 2│ ╰─────────┴────────────────────────╯ + Variables ╭──────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/weight_must_be_numeric.expected b/rust/pspp/src/sys/testdata/weight_must_be_numeric.expected index a77a5d4fdc..4e1bf58cad 100644 --- a/rust/pspp/src/sys/testdata/weight_must_be_numeric.expected +++ b/rust/pspp/src/sys/testdata/weight_must_be_numeric.expected @@ -13,6 +13,7 @@ File designates string variable STR1 (index 2) as weight variable, but weight va │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/weight_variable_bad_index.expected b/rust/pspp/src/sys/testdata/weight_variable_bad_index.expected index e4b2b8f514..dae8fb9619 100644 --- a/rust/pspp/src/sys/testdata/weight_variable_bad_index.expected +++ b/rust/pspp/src/sys/testdata/weight_variable_bad_index.expected @@ -13,6 +13,7 @@ File weight variable index 3 is invalid because it exceeds maximum variable inde │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/weight_variable_continuation.expected b/rust/pspp/src/sys/testdata/weight_variable_continuation.expected index 9dc6cf3df7..da6403f16b 100644 --- a/rust/pspp/src/sys/testdata/weight_variable_continuation.expected +++ b/rust/pspp/src/sys/testdata/weight_variable_continuation.expected @@ -13,6 +13,7 @@ File weight variable index 2 is invalid because it refers to long string continu │Variables│2│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/write-numeric-simple.expected b/rust/pspp/src/sys/testdata/write-numeric-simple.expected index 51f13ca578..efae9c863a 100644 --- a/rust/pspp/src/sys/testdata/write-numeric-simple.expected +++ b/rust/pspp/src/sys/testdata/write-numeric-simple.expected @@ -12,6 +12,7 @@ │Variables│4│ ╰─────────┴─╯ + Variables ╭─────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/write-numeric-uncompressed.expected b/rust/pspp/src/sys/testdata/write-numeric-uncompressed.expected index b1cf952ad5..3f908c6f30 100644 --- a/rust/pspp/src/sys/testdata/write-numeric-uncompressed.expected +++ b/rust/pspp/src/sys/testdata/write-numeric-uncompressed.expected @@ -12,6 +12,7 @@ │Variables│4│ ╰─────────┴─╯ + Variables ╭─────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/write-numeric-zlib.expected b/rust/pspp/src/sys/testdata/write-numeric-zlib.expected index 46c6fbb2c3..9295cfe888 100644 --- a/rust/pspp/src/sys/testdata/write-numeric-zlib.expected +++ b/rust/pspp/src/sys/testdata/write-numeric-zlib.expected @@ -12,6 +12,7 @@ │Variables│4│ ╰─────────┴─╯ + Variables ╭─────────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/write-string-simple.expected b/rust/pspp/src/sys/testdata/write-string-simple.expected index c034000a09..40458838bd 100644 --- a/rust/pspp/src/sys/testdata/write-string-simple.expected +++ b/rust/pspp/src/sys/testdata/write-string-simple.expected @@ -12,6 +12,7 @@ │Variables│5│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/write-string-uncompressed.expected b/rust/pspp/src/sys/testdata/write-string-uncompressed.expected index 4cc7d6ecae..09746ba3fe 100644 --- a/rust/pspp/src/sys/testdata/write-string-uncompressed.expected +++ b/rust/pspp/src/sys/testdata/write-string-uncompressed.expected @@ -12,6 +12,7 @@ │Variables│5│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/write-string-zlib.expected b/rust/pspp/src/sys/testdata/write-string-zlib.expected index 11e64a4529..c6a3f0db22 100644 --- a/rust/pspp/src/sys/testdata/write-string-zlib.expected +++ b/rust/pspp/src/sys/testdata/write-string-zlib.expected @@ -12,6 +12,7 @@ │Variables│5│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/wrong_display_alignment.expected b/rust/pspp/src/sys/testdata/wrong_display_alignment.expected index 7628df79a2..fa6fa29ac0 100644 --- a/rust/pspp/src/sys/testdata/wrong_display_alignment.expected +++ b/rust/pspp/src/sys/testdata/wrong_display_alignment.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe8: In variable display record: Invalid variab │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/wrong_display_measurement_level.expected b/rust/pspp/src/sys/testdata/wrong_display_measurement_level.expected index 783766c84a..5d76ed0661 100644 --- a/rust/pspp/src/sys/testdata/wrong_display_measurement_level.expected +++ b/rust/pspp/src/sys/testdata/wrong_display_measurement_level.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xe8: In variable display record: Invalid variab │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/wrong_display_parameter_count.expected b/rust/pspp/src/sys/testdata/wrong_display_parameter_count.expected index cefc24fa1b..3617b645db 100644 --- a/rust/pspp/src/sys/testdata/wrong_display_parameter_count.expected +++ b/rust/pspp/src/sys/testdata/wrong_display_parameter_count.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xf0: In variable display record: Record contain │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/wrong_display_parameter_size.expected b/rust/pspp/src/sys/testdata/wrong_display_parameter_size.expected index 06a93186ed..e8fda3180c 100644 --- a/rust/pspp/src/sys/testdata/wrong_display_parameter_size.expected +++ b/rust/pspp/src/sys/testdata/wrong_display_parameter_size.expected @@ -13,6 +13,7 @@ Warning at file offsets 0xe0 to 0xf0: In extension record: variable display reco │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/wrong_special_floats.expected b/rust/pspp/src/sys/testdata/wrong_special_floats.expected index 6e55891088..b73def632a 100644 --- a/rust/pspp/src/sys/testdata/wrong_special_floats.expected +++ b/rust/pspp/src/sys/testdata/wrong_special_floats.expected @@ -17,6 +17,7 @@ System file specifies value 2.0 (0x1.0p1) as LOWEST but -1.7976931348623157e308 │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/wrong_variable_positions.expected b/rust/pspp/src/sys/testdata/wrong_variable_positions.expected index 7c01e4d720..34858dc921 100644 --- a/rust/pspp/src/sys/testdata/wrong_variable_positions.expected +++ b/rust/pspp/src/sys/testdata/wrong_variable_positions.expected @@ -13,6 +13,7 @@ File header claims 2 variable positions but 1 were read from file. │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/wrong_variable_positions_but_v13.expected b/rust/pspp/src/sys/testdata/wrong_variable_positions_but_v13.expected index d701ada126..463a44e39b 100644 --- a/rust/pspp/src/sys/testdata/wrong_variable_positions_but_v13.expected +++ b/rust/pspp/src/sys/testdata/wrong_variable_positions_but_v13.expected @@ -13,6 +13,7 @@ │Variables│ 2│ ╰─────────┴────────────────────────╯ + Variables ╭──────────────────────────┬────────┬──────────────────────────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│ Label │Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├──────────────────────────┼────────┼──────────────────────────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/zcompressed_data.expected b/rust/pspp/src/sys/testdata/zcompressed_data.expected index 834891e4f6..66f4355225 100644 --- a/rust/pspp/src/sys/testdata/zcompressed_data.expected +++ b/rust/pspp/src/sys/testdata/zcompressed_data.expected @@ -12,6 +12,7 @@ │Variables│ 5│ ╰─────────┴────────────────────────╯ + Variables ╭─────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/zcompressed_data_uncompressed_size_block_size.expected b/rust/pspp/src/sys/testdata/zcompressed_data_uncompressed_size_block_size.expected index c12460b4f5..b5fabe9da7 100644 --- a/rust/pspp/src/sys/testdata/zcompressed_data_uncompressed_size_block_size.expected +++ b/rust/pspp/src/sys/testdata/zcompressed_data_uncompressed_size_block_size.expected @@ -14,6 +14,7 @@ Warning at file offsets 0x1c4 to 0x1dc: In ZLIB trailer: Block descriptor 0 repo │Variables│ 5│ ╰─────────┴────────────────────────╯ + Variables ╭─────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├─────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ diff --git a/rust/pspp/src/sys/testdata/zero_or_one_variable_in_mrset.expected b/rust/pspp/src/sys/testdata/zero_or_one_variable_in_mrset.expected index 098e5345a5..a7a05a9cce 100644 --- a/rust/pspp/src/sys/testdata/zero_or_one_variable_in_mrset.expected +++ b/rust/pspp/src/sys/testdata/zero_or_one_variable_in_mrset.expected @@ -15,6 +15,7 @@ Multiple response set $b has no variables. │Variables│1│ ╰─────────┴─╯ + Variables ╭────┬────────┬─────┬─────────────────┬─────┬─────┬─────────┬────────────┬────────────┬──────────────╮ │ │Position│Label│Measurement Level│ Role│Width│Alignment│Print Format│Write Format│Missing Values│ ├────┼────────┼─────┼─────────────────┼─────┼─────┼─────────┼────────────┼────────────┼──────────────┤ -- 2.30.2