commit a69bb97: [Test] Fix broken tests as it is confirmed by browser \m/

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Jul 2 10:42:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-02 11:35:15 +0100
URL: https://github.com/rspamd/rspamd/commit/a69bb975bab282437df559fd0efb25db3c174dba (HEAD -> master)

[Test] Fix broken tests as it is confirmed by browser \m/

---
 src/libserver/html/html.cxx | 15 +++++++--------
 test/lua/unit/html.lua      |  2 +-
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index 967411b2a..687518343 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -1930,13 +1930,6 @@ TEST_CASE("html text extraction")
 {
 
 	const std::vector<std::pair<std::string, std::string>> cases{
-			{"  <body>\n"
-			 "    <!-- page content -->\n"
-			 "    Hello, world!<br>test</br><br>content</hr>more content<br>\n"
-			 "    <div>\n"
-			 "      content inside div\n"
-			 "    </div>\n"
-			 "  </body>", "Hello, world!\ntest\ncontent\nmore content\ncontent inside div\n"},
 			{"  <body>\n"
 			 "    <!-- escape content -->\n"
 			 "    a b a > b a < b a & b 'a "a"\n"
@@ -2000,7 +1993,13 @@ TEST_CASE("html text extraction")
 			 "        <td>data2</td>\n"
 			 "      </tr>\n"
 			 "    </table>", "heada headb\ndata1 data2\n"},
-
+			{"  <body>\n"
+			 "    <!-- page content -->\n"
+			 "    Hello, world!<br>test</br><br>content</hr>more content<br>\n"
+			 "    <div>\n"
+			 "      content inside div\n"
+			 "    </div>\n"
+			 "  </body>", "Hello, world!\ntest\ncontentmore content\ncontent inside div\n"},
 	};
 
 	rspamd_url_init(NULL);
diff --git a/test/lua/unit/html.lua b/test/lua/unit/html.lua
index 8582c4edc..81c52ec1b 100644
--- a/test/lua/unit/html.lua
+++ b/test/lua/unit/html.lua
@@ -56,7 +56,7 @@ context("HTML processing", function()
     </div>
   </body>
 </html>
-      ]], 'Hello, world!\ntest\ncontent\nmore content\ncontent inside div\n'},
+      ]], 'Hello, world!\ntest\ncontentmore content\ncontent inside div\n'},
       {[[
 <html lang="en">
   <head>


More information about the Commits mailing list