forked from 1b-agent/opencadstudio-upstream
Fix two test failures affecting CI and local test runs:
1. Cross-platform test runner thread stack overflow:
In debug builds (opt-level = 0), `app.view(wid)` constructs the entire Iced UI
widget tree (ribbon, tool panels, palettes, command line, status bar).
Because libtest spawns test worker threads without setting an explicit stack
size, the default thread stack allocated by the OS (2MB on Linux glibc, 1-2MB
on Windows) overflows during recursive un-inlined view construction in
`app::automation::tests::test_pline_line_then_arc`.
- Set `[env] RUST_MIN_STACK = "8388608"` in `.cargo/config.toml` so `cargo test`
allocates 8MB per test thread across all platforms (Linux CI, macOS, Windows).
- Wrapped `test_pline_line_then_arc` in an explicit 8MB thread via
`std::thread::Builder` to guarantee immunity even when invoked without env vars.
2. Windows temporary path formatting in JSON payload:
In `app::update::page_setup_import::tests::psetupin_imports_named_setups_from_a_saved_drawing`,
interpolating `source.display()` directly into a raw JSON string resulted in
unescaped backslashes from Windows paths, causing JSON deserialization to fail.
Replaced backslashes with forward slashes to ensure cross-platform valid JSON strings.