From 8e9e3ecf6935db84bbc731252f592795675de685 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 27 Nov 2022 12:09:08 -0700 Subject: Some cleanup around editing --- tests/core/test_html.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/core/test_html.py (limited to 'tests') diff --git a/tests/core/test_html.py b/tests/core/test_html.py new file mode 100644 index 0000000..012a0ce --- /dev/null +++ b/tests/core/test_html.py @@ -0,0 +1,15 @@ +from core.html import html_to_plaintext + + +def test_html_to_plaintext(): + + assert html_to_plaintext("

Hi!

") == "Hi!" + assert html_to_plaintext("

Hi!
There

") == "Hi!\nThere" + assert ( + html_to_plaintext("

Hi!

\n\n

How are you?

") == "Hi!\n\nHow are you?" + ) + + assert ( + html_to_plaintext("

Hi!

\n\n

How are
you?

today

") + == "Hi!\n\nHow are\n you?\n\ntoday" + ) -- cgit v1.2.3