commit 8a5c541: [Test] Fix test tlds

Vsevolod Stakhov vsevolod at rspamd.com
Tue Nov 15 20:56:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-11-15 20:52:39 +0000
URL: https://github.com/rspamd/rspamd/commit/8a5c5410e696273fb161d762e369562ff9a53e25 (HEAD -> master)

[Test] Fix test tlds

---
 test/functional/lua/tlds.lua |  1 +
 test/lua/unit/test_tld.dat   | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/test/functional/lua/tlds.lua b/test/functional/lua/tlds.lua
index 0908001da..24836b393 100644
--- a/test/functional/lua/tlds.lua
+++ b/test/functional/lua/tlds.lua
@@ -39,6 +39,7 @@ rspamd_config:register_symbol({
             return
           end
           local u = rspamd_url.create(pool, p .. d)
+          assert(u, "cannot parse string: " .. p .. d)
           test = u:get_tld()
           if (test ~= d) then
             local opt = string.format('url.create:p=%s;d=%s;got=%s', p, d, test)
diff --git a/test/lua/unit/test_tld.dat b/test/lua/unit/test_tld.dat
index c1cd41723..5a804f4a9 100644
--- a/test/lua/unit/test_tld.dat
+++ b/test/lua/unit/test_tld.dat
@@ -4,3 +4,16 @@ net
 рф
 za.org
 xn--p1ai
+ac
+b.br
+co
+co.za
+in.net
+star.kawasaki.jp
+net.in
+star.nom.br
+org.ac
+ru.com
+za.net
+za.org
+org.za


More information about the Commits mailing list