From: Ben Pfaff Date: Tue, 6 Jan 2026 00:48:36 +0000 (-0800) Subject: add test for borders X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2224c6e0d5727aece04aa266e43d5d4877422aed;p=pspp add test for borders --- diff --git a/rust/pspp/src/spv/read/light.rs b/rust/pspp/src/spv/read/light.rs index 2a2f4d8692..a3fe4b6ed7 100644 --- a/rust/pspp/src/spv/read/light.rs +++ b/rust/pspp/src/spv/read/light.rs @@ -584,7 +584,7 @@ impl Border { 7 => look::Border::InnerFrame(BoxBorder::Right), 8 => look::Border::InnerFrame(BoxBorder::Bottom), 9 => look::Border::DataLeft, - 10 => look::Border::DataLeft, + 10 => look::Border::DataTop, 11 => look::Border::Dimension(RowColBorder(HeadingRegion::Rows, Axis2::X)), 12 => look::Border::Dimension(RowColBorder(HeadingRegion::Rows, Axis2::Y)), 13 => look::Border::Dimension(RowColBorder(HeadingRegion::Columns, Axis2::X)), diff --git a/rust/pspp/src/spv/read/tests.rs b/rust/pspp/src/spv/read/tests.rs index bda6783e94..fc38a10dbc 100644 --- a/rust/pspp/src/spv/read/tests.rs +++ b/rust/pspp/src/spv/read/tests.rs @@ -26,6 +26,12 @@ fn light2() { test_raw_spvfile("light2", None); } +/// Checks against regression for a bug reading borders. +#[test] +fn light3() { + test_raw_spvfile("light3", None); +} + #[test] fn legacy1() { test_raw_spvfile("legacy1", None); @@ -46,9 +52,7 @@ fn legacy4() { test_raw_spvfile("legacy4", None); } -/// Layer. -/// -/// (But we need to support selecting a layer value, too.) +/// Layers. #[test] fn legacy5() { test_raw_spvfile("legacy5", None); diff --git a/rust/pspp/src/spv/testdata/light3.expected b/rust/pspp/src/spv/testdata/light3.expected new file mode 100644 index 0000000000..a58d815ce0 --- /dev/null +++ b/rust/pspp/src/spv/testdata/light3.expected @@ -0,0 +1,8 @@ +Levene's Test of Equality of Error Variances[a] +Dependent Variable: Variable Name + F │df1│df2│Sig. +─────┼───┼───┼──── +1.186│ 19│136│.278 +─────┴───┴───┴──── +Tests the null hypothesis that the error variance of the dependent variable is equal across groups. +a. Design: Intercept + A + B + C + C + D + D * E diff --git a/rust/pspp/src/spv/testdata/light3.spv b/rust/pspp/src/spv/testdata/light3.spv new file mode 100644 index 0000000000..5188d784b1 Binary files /dev/null and b/rust/pspp/src/spv/testdata/light3.spv differ