test(tui): address command harness review

This commit is contained in:
Paulo Aboim Pinto
2026-06-07 12:24:13 +02:00
parent 96bff65797
commit acaae1c2e5
+4 -4
View File
@@ -1318,7 +1318,7 @@ mod tests {
command.name
);
for alias in command.aliases {
for &alias in command.aliases {
assert!(
!alias.trim().is_empty(),
"/{} alias must not be empty",
@@ -1326,7 +1326,7 @@ mod tests {
);
assert_eq!(
alias.trim(),
*alias,
alias,
"/{} alias /{alias} must not need trimming",
command.name
);
@@ -1353,7 +1353,7 @@ mod tests {
assert_eq!(resolved.name, command.name);
}
for alias in command.aliases {
for &alias in command.aliases {
for lookup in [alias.to_string(), format!("/{alias}")] {
let resolved = get_command_info(&lookup).unwrap_or_else(|| {
panic!("{lookup:?} should resolve to /{}", command.name)
@@ -1366,8 +1366,8 @@ mod tests {
#[test]
fn every_registered_command_has_a_help_topic() {
for command in COMMANDS {
let mut app = create_test_app();
for command in COMMANDS {
let result = execute(&format!("/help {}", command.name), &mut app);
assert!(
!result.is_error,