()
| 351 | |
| 352 | #[test] |
| 353 | fn test_chat_message() { |
| 354 | let input = "Hi! How are you?\n\n---\n\nI am good.\n-- \nSent with my Delta Chat Messenger: https://delta.chat".to_string(); |
| 355 | let SimplifiedText { |
| 356 | text, |
| 357 | is_forwarded, |
| 358 | is_cut, |
| 359 | footer, |
| 360 | .. |
| 361 | } = simplify(input, true); |
| 362 | assert_eq!(text, "Hi! How are you?\n\n---\n\nI am good."); |
| 363 | assert!(!is_forwarded); |
| 364 | assert!(!is_cut); |
| 365 | assert_eq!( |
| 366 | footer.unwrap(), |
| 367 | "Sent with my Delta Chat Messenger: https://delta.chat" |
| 368 | ); |
| 369 | } |
| 370 | |
| 371 | #[test] |
| 372 | fn test_simplify_trim() { |
nothing calls this directly
no test coverage detected