MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parses_kv_flags

Function parses_kv_flags

nodedb/src/ctl/args.rs:91–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89
90 #[test]
91 fn parses_kv_flags() {
92 let args = vec![
93 "--data-dir".into(),
94 "/var/nodedb".into(),
95 "--node-id".into(),
96 "3".into(),
97 ];
98 let m = parse_flags(&args).unwrap();
99 assert_eq!(m.get("data-dir").unwrap(), "/var/nodedb");
100 assert_eq!(m.get("node-id").unwrap(), "3");
101 }
102
103 #[test]
104 fn lone_flag_is_boolean() {

Callers

nothing calls this directly

Calls 1

parse_flagsFunction · 0.85

Tested by

no test coverage detected