add test for borders rust
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 6 Jan 2026 00:48:36 +0000 (16:48 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 6 Jan 2026 00:48:36 +0000 (16:48 -0800)
rust/pspp/src/spv/read/light.rs
rust/pspp/src/spv/read/tests.rs
rust/pspp/src/spv/testdata/light3.expected [new file with mode: 0644]
rust/pspp/src/spv/testdata/light3.spv [new file with mode: 0644]

index 2a2f4d8692f25ac72a366321dc169336f0266e9e..a3fe4b6ed7725fdd7bb78f7087c87fb110a07200 100644 (file)
@@ -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)),
index bda6783e94848fc4c8508ee3a71065754f5115fa..fc38a10dbcbf101b3391fab02abd0fc82a9f776c 100644 (file)
@@ -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 (file)
index 0000000..a58d815
--- /dev/null
@@ -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 (file)
index 0000000..5188d78
Binary files /dev/null and b/rust/pspp/src/spv/testdata/light3.spv differ