Skip to content

Commit 4ec0b4d

Browse files
ligurioTotktonada
authored andcommitted
test: update expected message
Curl 7.86 introduced a commit 5e259d7b ("pingpong: extend the response reading error with errno") that breaks a test. Commit extended the response reading error with errno. Patch updates a message and fixes the test. Part of #70 Follows up curl/curl#9443
1 parent eeb175a commit 4ec0b4d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/smtp.test.lua

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ test:test("smtp.client", function(test)
268268
r = client:request(addr, '[email protected]',
269269
270270
'mail.body')
271-
test:is(r.reason, 'response reading failed', 'unexpected response code')
271+
local expected_reason = 'response reading failed'
272+
if is_curl_version_ge(7, 86, 0) == true then
273+
expected_reason = 'response reading failed (errno: 115)'
274+
end
275+
test:is(r.reason, expected_reason, 'unexpected response code')
272276
test:is(r.status, -1, 'expected code')
273277

274278
r = client:request(addr, '[email protected]',
@@ -292,7 +296,11 @@ test:test("smtp.client", function(test)
292296
r = client:request(addr, '[email protected]',
293297
294298
'mail.body')
295-
test:is(r.reason, 'response reading failed', 'unexpected response code')
299+
local expected_reason = 'response reading failed'
300+
if is_curl_version_ge(7, 86, 0) == true then
301+
expected_reason = 'response reading failed (errno: 115)'
302+
end
303+
test:is(r.reason, expected_reason, 'unexpected response code')
296304
test:is(r.status, -1, 'expected code')
297305

298306
end)

0 commit comments

Comments
 (0)