From 56893e9dcd1eeebffb42b227a2151e18d49bc370 Mon Sep 17 00:00:00 2001 From: Gerardo Marset Date: Mon, 25 Feb 2013 20:28:28 -0200 Subject: Use the length operator (#) instead of table.getn. table.getn was deprecated in Lua 5.1 in favor of #, the length operator. See: http://www.lua.org/manual/5.1/manual.html#7.2 --- test/httptest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/httptest.lua') diff --git a/test/httptest.lua b/test/httptest.lua index 614acf3..d5fbb37 100644 --- a/test/httptest.lua +++ b/test/httptest.lua @@ -66,7 +66,7 @@ local check_request = function(request, expect, ignore) local response = {} response.code, response.headers, response.status = socket.skip(1, http.request(request)) - if t and table.getn(t) > 0 then response.body = table.concat(t) end + if t and #t > 0 then response.body = table.concat(t) end check_result(response, expect, ignore) end -- cgit v1.2.3-55-g6feb