commit f40aecd: [Test] Add a test case for URL parsing
Anton Yuzhaninov
citrin+git at citrin.ru
Wed Jan 15 10:56:06 UTC 2020
Author: Anton Yuzhaninov
Date: 2020-01-14 16:31:13 +0000
URL: https://github.com/rspamd/rspamd/commit/f40aecdce758d3dd54fee89a39090482243c415f (refs/pull/3213/head)
[Test] Add a test case for URL parsing
Currently it fails because fragment is not extracted correctly.
---
test/lua/unit/url.lua | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/lua/unit/url.lua b/test/lua/unit/url.lua
index 894c3156e..e4baf5b6d 100644
--- a/test/lua/unit/url.lua
+++ b/test/lua/unit/url.lua
@@ -56,6 +56,9 @@ context("URL check functions", function()
end
cases = {
+ {'http://example.net/?arg=%23#fragment', true, {
+ host = 'example.net', fragment = 'fragment'
+ }},
{"http:/\\[::eeee:192.168.0.1]/#test", true, {
host = '::eeee:c0a8:1', fragment = 'test'
}},
More information about the Commits
mailing list