From d02dc3e91ecb233c8625ef6884cecfc678e56a85 Mon Sep 17 00:00:00 2001 From: Tanish Manku Date: Fri, 20 Nov 2026 06:11:09 -0700 Subject: [PATCH] Two tests that save DWG allow in-process conversion With the craft-libs bump a DWG is converted by a worker unless the process opts in. The UCS round-trip test and the SETVAR save test write their own drawings as DWG and now opt in themselves; the SETVAR one passed only when another test in the same binary had opted in first. --- crates/engine/tests/it/dim_vars.rs | 2 ++ crates/io/tests/ucs_roundtrip.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/crates/engine/tests/it/dim_vars.rs b/crates/engine/tests/it/dim_vars.rs index 871d972b3..ce4d6f1ee 100644 --- a/crates/engine/tests/it/dim_vars.rs +++ b/crates/engine/tests/it/dim_vars.rs @@ -102,6 +102,8 @@ fn new_variables_are_style_overrides_and_read_back() { #[test] fn setvar_dimension_variables_are_saved_with_the_drawing() { + // The drawing is the test's own, so it is converted in this process. + cadcraft_io::dwg_worker::allow_in_process(); // DIMSCALE was kept and DIMTIH, DIMDEC and DIMTAD were not (#3100). let mut s = Session::new(); for (name, v) in [("DIMSCALE", json!(2.5)), ("DIMTIH", json!(0)), ("DIMDEC", json!(2)), ("DIMTAD", json!(1))] { diff --git a/crates/io/tests/ucs_roundtrip.rs b/crates/io/tests/ucs_roundtrip.rs index caf89d4f4..2022f38d3 100644 --- a/crates/io/tests/ucs_roundtrip.rs +++ b/crates/io/tests/ucs_roundtrip.rs @@ -243,6 +243,8 @@ fn the_active_vport_points_at_the_named_ucs() { #[cfg(not(target_arch = "wasm32"))] #[test] fn model_and_layout_ucs_survive_a_dwg_save() { + // The drawing is the test's own, so it is converted in this process. + cadcraft_io::dwg_worker::allow_in_process(); let d = drawing(); let dwg = cadcraft_io::write(&d, "x.dwg").unwrap(); let back = cadcraft_io::read(&dwg, "x.dwg").unwrap();