From 2224c6e0d5727aece04aa266e43d5d4877422aed Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 5 Jan 2026 16:48:36 -0800 Subject: [PATCH] add test for borders --- rust/pspp/src/spv/read/light.rs | 2 +- rust/pspp/src/spv/read/tests.rs | 10 +++++++--- rust/pspp/src/spv/testdata/light3.expected | 8 ++++++++ rust/pspp/src/spv/testdata/light3.spv | Bin 0 -> 2105 bytes 4 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 rust/pspp/src/spv/testdata/light3.expected create mode 100644 rust/pspp/src/spv/testdata/light3.spv 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 0000000000000000000000000000000000000000..5188d784b17a0971851c24cfef05e7989be38fe9 GIT binary patch literal 2105 zcmWIWW@Zs#U|`^2P;OO?F_^T1(VCfo;XWq=gDis#g8>}G=VYd5l!PQE<)peKmL%#W zW#)y3a569}M#W^R0C8yrHv=Qf3!q*wu{ZRrzp$go{Fg!dTn_RJnI7?Z&O_ z&V^fDolPnHyHvGr_;%awAFuz59S=r2K zVo|;|v$ubKc6Rpt-)E1%JM7`ik$9o-->HJyL#7A6ieA@HlD~KPUw>3jx!gsz(igmL z(=xqp|yHB#-x+rjo{Yt59cKWQj zN*j*0_x?Y6%w&sFx$}I%{AQu$aVsbE&W)N{K7-fpv@mnXlk5{U2N?FKMlJU1w3=tX zDQsbj|DpqvBV4zil87u{{Z;BRYpb@q$ew3Y9N4BUIQmojbntrX;*^UYS41x{?Z2ax zx$gUpv?Xb+_f)uJ*X&96N$L8X#PhNITv0^dt}@AmQNJ|Ar!%g*F6^c>bB17Aq=$u# z2EUlM^(C(9Ufnx7dR{X6y}7dgVC*z5d3X62oCQ$~)91|HmL{ye@%7}Ji)9}K>uLbQ@7oWH#p*Im(kBKIPCTkxv9jXNgJ z@$_1?{^!OQ8&{;r^dC)HzEyMIlHEyq@ug1!PJP_6qx5QX*Wc(f{a)`+T}rBY`Ek{b zR>6Z}d|s)yGkGO`a(ASw?W>);*Q%dUFS|0Vuj=yYJLk?k4VNg5th1g{vn^^({wJ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