MCPcopy Create free account
hub / github.com/bootc-dev/bootc / test_find_all_str

Function test_find_all_str

crates/kernel_cmdline/src/utf8.rs:729–738  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

727
728 #[test]
729 fn test_find_all_str() {
730 let kargs = Cmdline::from("foo=bar rd.foo=a rd.bar=b rd.baz rd.qux=c notrd.val=d");
731 let mut rd_args: Vec<_> = kargs.find_all_starting_with("rd.").collect();
732 rd_args.sort_by(|a, b| a.key().cmp(&b.key()));
733 assert_eq!(rd_args.len(), 4);
734 assert_eq!(rd_args[0], param("rd.bar=b"));
735 assert_eq!(rd_args[1], param("rd.baz"));
736 assert_eq!(rd_args[2], param("rd.foo=a"));
737 assert_eq!(rd_args[3], param("rd.qux=c"));
738 }
739
740 #[test]
741 fn test_param_key_eq() {

Callers

nothing calls this directly

Calls 3

cmpMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected