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.
This commit is contained in:
Tanish Manku
2026-11-20 06:11:09 -07:00
parent 184571d17b
commit d02dc3e91e
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -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))] {
+2
View File
@@ -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();