aboutsummaryrefslogtreecommitdiffstats
path: root/test/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-16 15:22:51 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-16 15:22:51 +0100
commit80bce97605e1b514acbb36f365dd40b7105007ed (patch)
treec9e4d791e968fc68adb10e4e0f731bb254d2807d /test/lua
parent970fd7cc1c903cbb6124e3a6bff28ab0d94cece1 (diff)
downloadrspamd-80bce97605e1b514acbb36f365dd40b7105007ed.tar.gz
rspamd-80bce97605e1b514acbb36f365dd40b7105007ed.zip
Add logic to preserve newlines in HTML.
Diffstat (limited to 'test/lua')
-rw-r--r--test/lua/unit/html.lua11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/lua/unit/html.lua b/test/lua/unit/html.lua
index 22a03f6d6..f29d4eb3b 100644
--- a/test/lua/unit/html.lua
+++ b/test/lua/unit/html.lua
@@ -21,7 +21,7 @@ context("HTML processing", function()
<b>stuff</p>?
</body>
</html>
- ]], 'Hello, world! test data stuff?'},
+ ]], "Hello, world! test\r\ndata\r\nstuff?"},
{[[
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
@@ -39,7 +39,7 @@ context("HTML processing", function()
</p>
</body>
- </html>]], 'Hello, world!'},
+ </html>]], '\r\nHello, world!\r\n'},
{[[
<!DOCTYPE html>
<html lang="en">
@@ -53,13 +53,10 @@ context("HTML processing", function()
--></head>
<body>
<!-- page content -->
- Hello, world! <b>test</b>
- <p>data<>
- </P>
- <b>stuff</p>?
+ Hello, world!
</body>
</html>
- ]], 'Hello, world! test data stuff?'},
+ ]], 'Hello, world!'},
}
for _,c in ipairs(cases) do