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

Function test_parse_lines

crates/sysusers/src/nameservice/shadow.rs:136–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134
135 #[test]
136 fn test_parse_lines() {
137 let salted = salted();
138 let content = format!(
139 r#"
140root:*:18912:0:99999:7:::
141daemon:*:18474:0:99999:7:::
142
143salty:{salted}:18912:0:99999:7:::
144
145# Dummy comment
146systemd-coredump:!!:::::::
147systemd-resolve:!!:::::::
148rngd:!!:::::::
149"#
150 );
151
152 let input = Cursor::new(content);
153 let entries = parse_shadow_content(input).unwrap();
154 assert_eq!(entries.len(), 6);
155 assert_eq!(entries[2], mock_shadow_entry());
156 }
157
158 #[test]
159 fn test_write_entry() {

Callers

nothing calls this directly

Calls 2

saltedFunction · 0.85
parse_shadow_contentFunction · 0.85

Tested by

no test coverage detected