mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Add proptest to check dc_header_{encode,decode}
This commit is contained in:
committed by
holger krekel
parent
33b98a15d3
commit
96fbeb583b
@@ -383,5 +383,13 @@ mod tests {
|
||||
// make sure this never panics
|
||||
let _decoded = dc_decode_ext_header(&buf);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dc_header_roundtrip(input: String) {
|
||||
let encoded = unsafe { dc_encode_header_words(&input) };
|
||||
let decoded = dc_decode_header_words_safe(&encoded);
|
||||
|
||||
assert_eq!(input, decoded);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user