Files
benilla-octo/crates/benilla-formats/tests/wow_data_none.rs
T
SamandClaude Fable 5 e34600ff27 the client boots with no install, and the idle egui lane goes quiet
- with no WoW install the client boots to the login screen instead of panicking on frame one: three world systems demanded install-gated resources their own startup never inserts
- `WOW_DATA=` — set and empty — means there is no install, in any build; the cursor says "no client data" once instead of thirty-one times
- the per-frame `bevy_egui pass output has not been prepared` ERROR is gone: a gated context runs an empty pass itself, so the idle lane keeps its savings and the log stays silent
- ECS diagnostics name their system in a dev build — no more `<Enable the debug feature to see the name>` in a panic

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 19:06:09 +07:00

28 lines
1.2 KiB
Rust

//! `WOW_DATA=` — set and empty — means **there is no install**, through the real env read.
//!
//! The ladder's own logic is unit-tested purely against `candidates_from`; this covers the wiring,
//! which is the half a pure test cannot see. It is its own file for the reason the sibling
//! `wow_data_env.rs` explains: setting `$WOW_DATA` is process-global, every test in the workspace
//! now resolves its install through that one read, and cargo gives each integration-test file its
//! own process — so one mutating test per file can only reach itself.
//!
//! What it protects (decision 1451): a dev build on a machine with an install cannot otherwise
//! reach the no-install boot path, so nothing exercised it and it rotted into a frame-one panic.
//! This spelling is what `scripts/gates.sh` runs the engine enforcer under.
#[test]
fn an_empty_override_means_no_install() {
std::env::set_var("WOW_DATA", "");
assert_eq!(
benilla_formats::wow_data(),
None,
"`WOW_DATA=` must resolve to no install even where one exists"
);
assert!(
benilla_formats::candidates().is_empty(),
"`WOW_DATA=` must leave nothing on the ladder to report as looked-in"
);
std::env::remove_var("WOW_DATA");
}