Skip to content

Commit 3fba1d6

Browse files
committed
Update test
1 parent 1062805 commit 3fba1d6

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

test/run.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ print("")
1515

1616
require "test_safe"
1717
require "test_easy"
18+
require "test_form"

test/test_easy.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ local json = require "dkjson"
99
local url = "http://example.com"
1010
local 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+
1218
local function weak_ptr(val)
1319
return setmetatable({value = val},{__mode = 'v'})
1420
end
@@ -328,7 +334,7 @@ end
328334

329335
end
330336

331-
local _ENV = TEST_CASE'reader_callback' if ENABLE then
337+
local _ENV = TEST_CASE'read_callback' if ENABLE then
332338

333339
local url = "http://httpbin.org/post"
334340

@@ -376,7 +382,7 @@ function test()
376382
end
377383

378384
function 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)
408414
end
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

Comments
 (0)