add test for binary word-encoded filenames

This commit is contained in:
B. Petersen
2020-12-02 14:42:59 +01:00
parent 7c9624e822
commit 412645e1ce
2 changed files with 35 additions and 0 deletions

View File

@@ -1489,6 +1489,15 @@ mod tests {
assert_eq!(filename, Some("Maßnahmen Okt. 2020.html".to_string()))
}
#[test]
fn test_get_attachment_filename_encoded_words_binary() {
let mail = load_mail_with_attachment(include_bytes!(
"../test-data/message/attach_filename_encoded_words_binary.eml"
));
let filename = get_attachment_filename(&mail.subparts[1]).unwrap();
assert_eq!(filename, Some(" § 165 Abs".to_string()))
}
#[test]
fn test_get_attachment_filename_encoded_words_cont() {
// test continued encoded-words and also test apostropes work that way