mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-12 00:43:16 -06:00
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.
This commit is contained in:
@@ -3612,6 +3612,7 @@ fn xls_fixture() -> Vec<u8> {
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user