diff --git a/crates/benilla-app/tests/reference_strings.rs b/crates/benilla-app/tests/reference_strings.rs index f122e015..38b16487 100644 --- a/crates/benilla-app/tests/reference_strings.rs +++ b/crates/benilla-app/tests/reference_strings.rs @@ -144,6 +144,13 @@ fn no_user_facing_sentence_is_written_in_rust_when_the_reference_ships_one() { let mut shipped: HashMap> = HashMap::new(); // The base tables and the locale patches: where `Localize()` redefines a key, its wording is // the one the player reads. + // Whether either `Localize()` file yielded anything, which is what proves the wrapper shape + // still parses. Asserted over the pair rather than per file: this realm's + // `GlueXML\GlueLocalization.lua` has its whole `Localize()` body commented out and tweaks + // frames instead, so demanding a sentence of *that* file failed the gate on a chain where + // nothing is wrong. `FrameXML\Localization.lua` carries the enGB overrides and still proves + // the shape. + let mut wrapped_yielded = false; for file in [ "Interface\\FrameXML\\GlobalStrings.lua", "Interface\\FrameXML\\Localization.lua", @@ -165,10 +172,19 @@ fn no_user_facing_sentence_is_written_in_rust_when_the_reference_ships_one() { taken += 1; } } - // Every source must contribute: the `Localize()` files wrap their assignments in a - // function, a shape the base tables never have. - assert!(taken > 0, "{file} contributed no sentences"); + // A base table can never be empty; a `Localize()` patch can be, and this chain's Glue one + // is. + if file.ends_with("Localization.lua") { + wrapped_yielded |= taken > 0; + } else { + assert!(taken > 0, "{file} contributed no sentences"); + } } + assert!( + wrapped_yielded, + "neither Localize() file contributed a sentence — the wrapper shape stopped parsing, and \ + a locale override is the wording the player actually reads" + ); let mut sources = Vec::new(); walk(Path::new("src"), &mut sources);