One more layer-state DWG test opts in; the CLI's run documents that it needs a DWG worker

Found by running every test of the io, engine, CLI, UI and MCP crates in its
own process, as CI does: no other test needs the call.
This commit is contained in:
Tanish Manku
2026-11-20 06:45:34 -07:00
parent 8152c9e71b
commit db66a8cd95
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -76,6 +76,10 @@ pub fn command() -> clap::Command {
/// Run the CLI on its arguments (without the program name). Returns the process exit code (0 ok,
/// 1 failure, 2 usage). clap reads the arguments as they are: a value that is not valid Unicode
/// is a usage error, never a panic as with `std::env::args()`.
///
/// Reading or writing DWG needs a conversion worker, which this function does not set up: the
/// binary calls `cadcraft_io::dwg_worker::use_own_worker()` first. A caller that hasn't set one up
/// gets "no worker is configured" and exit code 1 for a DWG file.
pub fn run<I, T>(args: I, out: &mut dyn Write, err: &mut dyn Write) -> i32
where
I: IntoIterator<Item = T>,
+2
View File
@@ -367,6 +367,8 @@ fn a_layer_of_an_xref_gets_group_93() {
#[test]
fn named_plot_styles_are_written_by_placeholder() {
// The drawing is the test's own, so it is converted in this process.
cadcraft_io::dwg_worker::allow_in_process();
// In a drawing of named plot styles AutoCAD 2024 writes a layer's plot style as group 390, the
// handle of the style's placeholder object (measured); CADCraft reads it back by that handle.
let mut d = drawing();