From 9ecb6d9b154611b1314a1fd04840075ee0ee72e6 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 15 Apr 2021 00:07:04 +0200 Subject: [PATCH] test dehtml for pre-tag (wrote that little test to test the new coverage script :)[D --- src/dehtml.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dehtml.rs b/src/dehtml.rs index 84cce2f46..d8c63c5bf 100644 --- a/src/dehtml.rs +++ b/src/dehtml.rs @@ -392,6 +392,13 @@ mod tests { assert_eq!(txt.trim(), "lots of text"); } + #[test] + fn test_pre_tag() { + let input = "
\ntwo\nlines\n
"; + let txt = dehtml(input).unwrap(); + assert_eq!(txt.trim(), "two\nlines"); + } + #[async_std::test] async fn test_quote_div() { let input = include_str!("../test-data/message/gmx-quote-body.eml");