diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-20 12:40:45 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-20 13:00:11 +0000 |
commit | 5c62c0da6a5af93a3a533aaa543b27d2668e8697 (patch) | |
tree | 4842422bcf24fb590bd2b8a798a1c58d7dd2b515 /test/lua | |
parent | c305ef1157ea4c578a783cc66ebcea66efdc851a (diff) | |
download | rspamd-5c62c0da6a5af93a3a533aaa543b27d2668e8697.tar.gz rspamd-5c62c0da6a5af93a3a533aaa543b27d2668e8697.zip |
[Minor] Add some more unit tests
Diffstat (limited to 'test/lua')
-rw-r--r-- | test/lua/unit/rfc2047.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/lua/unit/rfc2047.lua b/test/lua/unit/rfc2047.lua index 726a99890..15235f8af 100644 --- a/test/lua/unit/rfc2047.lua +++ b/test/lua/unit/rfc2047.lua @@ -30,13 +30,17 @@ context("RFC2047 decoding", function() ffi.cdef[[ const char * rspamd_mime_header_decode (void *pool, const char *in, size_t inlen); void * rspamd_mempool_new (size_t sz, const char *name); - void rspamd_mempool_destroy (void *pool); + void rspamd_mempool_delete (void *pool); ]] test("Decode rfc2047 tokens", function() -- Test -> expected local cases = { {"=?US-ASCII*EN?Q?Keith_Moore?= <moore@cs.utk.edu>", "Keith Moore <moore@cs.utk.edu>"}, + {[[=?windows-1251?Q?=C2=FB_=F1=EC=EE=E6=E5=F2=E5_=F5=E0=F0?= + =?windows-1251?Q?=E0=EA=F2=E5=F0=E8=E7=EE=E2=E0=F2=FC=F1?= + =?windows-1251?Q?=FF_=E7=EE=F0=EA=E8=EC_=E7=F0=E5=ED=E8?= + =?windows-1251?Q?=E5=EC?=]], "Вы сможете характеризоваться зорким зрением"}, } local pool = ffi.C.rspamd_mempool_new(4096, "lua") @@ -48,6 +52,6 @@ context("RFC2047 decoding", function() assert_not_nil(res, "cannot decode " .. c[1]) end - ffi.C.rspamd_mempool_destroy(pool) + ffi.C.rspamd_mempool_delete(pool) end) end) |