@@ -9,6 +9,12 @@ local json = require "dkjson"
99local url = " http://example.com"
1010local fname = " ./test.download"
1111
12+ print (" ------------------------------------" )
13+ print (" Lua version: " .. (_G .jit and _G .jit .version or _G ._VERSION ))
14+ print (" cURL version: " .. curl .version ())
15+ print (" ------------------------------------" )
16+ print (" " )
17+
1218local function weak_ptr (val )
1319 return setmetatable ({value = val },{__mode = ' v' })
1420end
328334
329335end
330336
331- local _ENV = TEST_CASE ' reader_callback ' if ENABLE then
337+ local _ENV = TEST_CASE ' read_callback ' if ENABLE then
332338
333339local url = " http://httpbin.org/post"
334340
@@ -376,7 +382,7 @@ function test()
376382end
377383
378384function test_abort_01 ()
379- assert_equal (f , f :add_stream (' SSSSS' , 128 , function () end ))
385+ assert_equal (f , f :add_stream (' SSSSS' , 128 * 1024 , function () end ))
380386 assert_equal (c , c :setopt_httppost (f ))
381387
382388 local _ , e = assert_nil (c :perform ())
@@ -407,7 +413,7 @@ function test_abort_04()
407413 assert_equal (curl .error (curl .ERROR_EASY , curl .E_ABORTED_BY_CALLBACK ), e )
408414end
409415
410- function test_abort_04 ()
416+ function test_abort_05 ()
411417 assert_equal (f , f :add_stream (' SSSSS' , 128 , function () error (" READERROR" ) end ))
412418 assert_equal (c , c :setopt_httppost (f ))
413419
0 commit comments