()
| 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() { |
nothing calls this directly
no outgoing calls
no test coverage detected