Skip to content

Commit 791c06e

Browse files
committed
Add. Test
1 parent e69056c commit 791c06e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/test_easy.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,19 @@ local function test_cb(name)
10571057

10581058
gc_collect()
10591059
assert_nil(pctx.value)
1060+
1061+
do local ctx = {}
1062+
pctx = weak_ptr(ctx)
1063+
assert(set(c, function() end, ctx))
1064+
end
1065+
1066+
gc_collect()
1067+
assert_table(pctx.value)
1068+
1069+
c:reset()
1070+
1071+
gc_collect()
1072+
assert_nil(pctx.value)
10601073
end
10611074

10621075
function test_read() test_cb('readfunction') end
@@ -1069,6 +1082,11 @@ function test_fnmatch() test_cb('fnmatch_function') end
10691082
function test_chunk_bgn() test_cb('chunk_bgn_function') end
10701083
function test_chunk_end() test_cb('chunk_end_function') end
10711084

1085+
if curl.OPT_HSTSREADFUNCTION then
1086+
function test_hstsreadfunction() test_cb('hstsreadfunction') end
1087+
function test_hstswritefunction() test_cb('hstswritefunction') end
1088+
end
1089+
10721090
end
10731091

10741092
local _ENV = TEST_CASE'set_slist' if ENABLE then

0 commit comments

Comments
 (0)