mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-02 02:38:30 -06:00
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:
@@ -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))] {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user