Watch
0
0
Fork
You've already forked hyperhive
0

tool_groups: add test for the case-insensitive is_known match

This commit is contained in:
damocles 2026-10-08 01:01:15 +02:00 • committed by mara
commit 8053462e2a

View file

@ -202,6 +202,13 @@ mod tests {
assert_eq!(map["alice"], vec!["messaging".to_owned()]);
}
#[test]
fn prune_unknown_keeps_a_hand_edited_differently_cased_known_name() {
let mut map = BTreeMap::from([("alice".to_owned(), vec!["Messaging".to_owned()])]);
assert!(!prune_unknown(&mut map));
assert_eq!(map["alice"], vec!["Messaging".to_owned()]);
}
#[test]
fn prune_unknown_drops_unrecognised_name() {
let mut map = BTreeMap::from([("alice".to_owned(), vec!["diagnostics".to_owned()])]);