From 04317413594437a201fd8f2e473d26a66d80e2b9 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 12 Nov 2026 04:37:07 +0000 Subject: [PATCH] tests: give the xls fixture its compound-file byte order mark craft-cfb refuses a header without the 0xFFFE mark at offset 28 ([MS-CFB] 2.2), so craft-xls's sniff called the fixture LegacyBinary. The old hand-written parser never read that field, which is why the test only broke with the switch. The fixture is a real workbook otherwise: sniff now says Xls and read_xls parses it. --- crates/engine/src/tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 8d6562d5d..3bf54d12f 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -3612,6 +3612,7 @@ fn xls_fixture() -> Vec { let mut put = |at: usize, v: &[u8]| b[at..at + v.len()].copy_from_slice(v); put(0, &[0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1]); put(26, &3u16.to_le_bytes()); + put(28, &0xFFFEu16.to_le_bytes()); // byte order ([MS-CFB] 2.2) put(30, &9u16.to_le_bytes()); put(32, &6u16.to_le_bytes()); put(44, &1u32.to_le_bytes());