add failing test for apostroped windows-1251 encoding

This commit is contained in:
B. Petersen
2020-12-04 00:19:19 +01:00
parent b510d74c4a
commit 56e6c2712b
2 changed files with 38 additions and 0 deletions

View File

@@ -1545,6 +1545,15 @@ mod tests {
assert_eq!(filename, Some("Maßnahmen März 2022.html".to_string()))
}
#[test]
fn test_get_attachment_filename_apostrophed_windows1251() {
let mail = load_mail_with_attachment(include_bytes!(
"../test-data/message/attach_filename_apostrophed_windows1251.eml"
));
let filename = get_attachment_filename(&mail.subparts[1]).unwrap();
assert_eq!(filename, Some("программирование.HTM".to_string()))
}
#[test]
fn test_get_attachment_filename_combined() {
// test that if `filename` and `filename*0` are given, the filename is not doubled