Close test: a clean window's close is checked without quitting

The test asserts MaterialCraft's own close decision for a clean package,
as it did with an injected quit, so it passes on macOS, where the
platform's quit cancels the window close. Unsaved work still runs the
whole close frame.
This commit is contained in:
aiongg committed 2026-11-25 18:26:17 +00:00
1 parent 266a94ea86
commit 8b2dafdffe
1 file changed
+2 -1
@@ -104,7 +104,8 @@ mod close_order_tests {
let mut clean = MaterialCraftApp::headless(materialcraft_engine::sample_session(), UiState::default());
clean.fonts_ready = true;
clean.session.modified = false;
assert!(!close_frame(&mut clean), "nothing to hold: the hook sees a close to take over");
// Only the app's decision: a close that goes ahead ends in the platform's quit, which macOS answers by canceling it.
assert!(!crate::unsaved::close_requested(&mut clean), "nothing to hold: the hook sees a close to take over");
}
}