add test apostrophed-encoding with cp1252 charset (aka ANSI aka Windows-1252)

This commit is contained in:
B. Petersen
2020-12-04 01:28:24 +01:00
parent 8de73c4566
commit e77706f7d0
2 changed files with 32 additions and 0 deletions

View File

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