MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_parse_trailer

Function test_parse_trailer

atomic-cli/src/commands/git/push.rs:1046–1058  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1044
1045 #[test]
1046 fn test_parse_trailer() {
1047 let msg = "feat: add auth\n\nAtomic-View: dev\nAtomic-State: ABC123\nAtomic-Changes: HASH1, HASH2\n";
1048 assert_eq!(parse_trailer(msg, "Atomic-View"), Some("dev".to_string()));
1049 assert_eq!(
1050 parse_trailer(msg, "Atomic-State"),
1051 Some("ABC123".to_string())
1052 );
1053 assert_eq!(
1054 parse_trailer(msg, "Atomic-Changes"),
1055 Some("HASH1, HASH2".to_string())
1056 );
1057 assert_eq!(parse_trailer(msg, "Atomic-Unknown"), None);
1058 }
1059
1060 #[test]
1061 fn test_parse_trailer_whitespace() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected