MCPcopy Create free account
hub / github.com/chatmail/core / test_chat_message

Function test_chat_message

src/simplify.rs:353–369  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

simplifyFunction · 0.85

Tested by

no test coverage detected