MCPcopy Create free account
hub / github.com/GCWing/BitFun / test_prefix_match

Function test_prefix_match

src/apps/cli/src/commands.rs:178–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176
177 #[test]
178 fn test_prefix_match() {
179 let result = match_substring_in("/he", COMMAND_SPECS);
180 assert_eq!(result.len(), 2);
181 let names: Vec<&str> = result.iter().map(|s| s.name).collect();
182 assert!(names.contains(&"/help"));
183 assert!(names.contains(&"/theme"));
184 }
185
186 #[test]
187 fn test_substring_match() {

Callers

nothing calls this directly

Calls 3

match_substring_inFunction · 0.85
collectMethod · 0.80
iterMethod · 0.80

Tested by

no test coverage detected