From 3948c83c00dd01ccd1d40ed64ba356707363ed85 Mon Sep 17 00:00:00 2001 From: ".CooCoo" Date: Mon, 16 Nov 2026 18:35:33 -0800 Subject: [PATCH] craft-xlsx: the testing module is built only for tests and the test-support feature (#1387) --- Cargo.lock | 1 + crates/xlsx/Cargo.toml | 7 +++++++ crates/xlsx/src/lib.rs | 1 + 3 files changed, 9 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index a0707582b..ed948433c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3254,6 +3254,7 @@ dependencies = [ "craft-drawingml", "craft-opc", "craft-sheet", + "craft-xlsx", "craft-xml", "thiserror 2.0.21", ] diff --git a/crates/xlsx/Cargo.toml b/crates/xlsx/Cargo.toml index 0d09f79aa..18be3abe7 100644 --- a/crates/xlsx/Cargo.toml +++ b/crates/xlsx/Cargo.toml @@ -10,9 +10,16 @@ repository.workspace = true [lints] workspace = true +[features] +# `testing`: writers of small workbooks and packages, for the tests of crates that read them. +test-support = [] + [dependencies] craft-drawingml = { workspace = true } craft-opc = { workspace = true } craft-sheet = { workspace = true } craft-xml = { workspace = true } thiserror = { workspace = true } + +[dev-dependencies] +craft-xlsx = { path = ".", features = ["test-support"] } diff --git a/crates/xlsx/src/lib.rs b/crates/xlsx/src/lib.rs index 9105ba886..3d2853972 100644 --- a/crates/xlsx/src/lib.rs +++ b/crates/xlsx/src/lib.rs @@ -60,6 +60,7 @@ mod richdata; mod sheet; mod strings; mod styles; +#[cfg(any(test, feature = "test-support"))] #[doc(hidden)] pub mod testing; mod workbook;