Join the state-order error's two lines with a continuation

The message carried the source's indentation between "the" and "game";
the test now checks the block's id and the single spaces.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Ludovic MarieandClaude Opus 5.5 committed 2026-11-01 19:12:15 +01:00
1 parent 576fb98696
commit dc1597e116
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -777,7 +777,8 @@ impl<'a> Plan<'a> {
&& let Some(early) = decl.state_properties.keys().find(|k| k.as_str() < last)
{
return Err(format!(
"{}: state property {early} sorts before {last}, a property of {}: the game orders states by property name, so name it after {last}",
"{}: state property {early} sorts before {last}, a property of {}: the \
game orders states by property name, so name it after {last}",
decl.id, decl.template
)
.into());
@@ -2681,10 +2681,10 @@ fn content_block_state_properties_are_validated() {
Ok(_) => panic!("a property sorting before the template's was accepted"),
};
assert!(
error.contains("testmod:") || error.contains("alpha sorts before axis"),
error.contains("testmod:") && error.contains("alpha sorts before axis, a property of"),
"{error}"
);
assert!(error.contains("alpha sorts before axis"), "{error}");
assert!(!error.contains(" "), "one space between words: {error}");
fs::remove_dir_all(&base).unwrap();
fs::remove_dir_all(base.parent().unwrap().join("mod0")).ok();