From 6a6b403216eede455da753da96d56ce539b087be Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Fri, 15 Mar 2019 19:02:40 -0500 Subject: [PATCH] Added test for html -> plain text (#7) Test passed; this was fixed in commit 7e36fff0f135740181a8967ee2f54172019ec957 which has yet to be deployed --- src/PrayerTracker.Tests/UI/UtilsTests.fs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PrayerTracker.Tests/UI/UtilsTests.fs b/src/PrayerTracker.Tests/UI/UtilsTests.fs index a1d9f42..dbf2384 100644 --- a/src/PrayerTracker.Tests/UI/UtilsTests.fs +++ b/src/PrayerTracker.Tests/UI/UtilsTests.fs @@ -61,6 +61,11 @@ let htmlToPlainTextTests = test "does not fail when passed an empty string" { Expect.equal (htmlToPlainText "") "" "Should return an empty string when given an empty string" } + test "preserves blank lines for two consecutive line breaks" { + let expected = "Paragraph 1\n\nParagraph 2\n\n...and paragraph 3" + Expect.equal (htmlToPlainText "Paragraph 1

Paragraph 2

...and paragraph 3") + expected "Blank lines not preserved for consecutive line breaks" + } ] []