Engine tests before the vector cut: the closed-doc check's coverage floor is a share of core's commands

Core's test process installs only core's commands, so the count of checked commands drops at
each crate cut; the floor is now 85 % of the commands with a parsed doc (91 % today, before and
after the vector cut).
This commit is contained in:
aiongg committed 2026-11-24 01:35:39 +00:00
1 parent 4b67fd4b9b
commit ac0dfaf774
1 file changed
+7 -2
+7 -2
View File
@@ -160,9 +160,10 @@ mod tests {
fn every_command_with_a_closed_doc_rejects_an_unknown_key() {
// #7596: an undocumented key used to run the command on its defaults and report success.
crate::install().unwrap();
let mut checked = 0;
let (mut checked, mut parsed) = (0, 0);
for spec in crate::commands::command_specs() {
let Some(schema) = param_schema::of(spec) else { continue };
parsed += 1;
let typo = json!({"zzTypo": 1});
if schema.open() || crate::registry::is_incomplete(spec.id) {
assert!(check(spec, &typo).is_ok(), "{}", spec.id);
@@ -180,7 +181,11 @@ mod tests {
}
checked += 1;
}
assert!(checked > 850, "{checked}");
// Most of core's commands with a parsed doc are checked: the rest have open or incomplete
// docs. On 24 Nov that was 860 of 943 (91 %), and 802 of 883 (91 %) once the vector commands
// moved to their own crate. A share instead of a count holds as further crates are cut out
// of core, and still fails if the check stops reaching most commands.
assert!(checked * 100 >= parsed * 85, "{checked} of {parsed} commands with a parsed doc checked");
}
#[test]