]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Add a test case for URL parsing 3213/head
authorAnton Yuzhaninov <citrin+git@citrin.ru>
Tue, 14 Jan 2020 16:31:13 +0000 (16:31 +0000)
committerAnton Yuzhaninov <citrin+git@citrin.ru>
Tue, 14 Jan 2020 16:31:38 +0000 (16:31 +0000)
Currently it fails because fragment is not extracted correctly.

test/lua/unit/url.lua

index 894c3156e1813a4392170b41794250bafeaa2974..e4baf5b6d77f9ded2e73c2d2ead426df5d47ee64 100644 (file)
@@ -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'
     }},