File tree Expand file tree Collapse file tree 7 files changed +35
-18
lines changed
Expand file tree Collapse file tree 7 files changed +35
-18
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ set PATH=%LR_ROOT%;%LR_SYSTREE%\bin;%PATH%
142142
143143:: Lua will use just the system rocks
144144set LUA_PATH = %LR_ROOT% \lua\?.lua;%LR_ROOT% \lua\?\init.lua
145+ set LUA_PATH = %LUA_PATH% ;.\?.lua;
145146set LUA_PATH = %LUA_PATH% ;%LR_SYSTREE% \share\lua\%LUA_SHORTV% \?.lua
146147set LUA_PATH = %LUA_PATH% ;%LR_SYSTREE% \share\lua\%LUA_SHORTV% \?\init.lua
147148set LUA_CPATH = %LR_SYSTREE% \lib\lua\%LUA_SHORTV% \?.dll
Original file line number Diff line number Diff line change @@ -43,11 +43,12 @@ before_script:
4343script :
4444 - cd test
4545 - lua -e "print(require 'cURL.utils'.find_ca_bundle())"
46- - lunit.sh test_easy.lua
47- - lunit.sh test_safe.lua
48- - lunit.sh test_form.lua
49- - lunit.sh test_pause02.c.lua
50- - lunit.sh test_curl.lua
46+ - lunit.sh run.lua
47+ - lua test_pause02.c.lua
48+ # - lunit.sh test_easy.lua
49+ # - lunit.sh test_safe.lua
50+ # - lunit.sh test_form.lua
51+ # - lunit.sh test_curl.lua
5152
5253after_success :
5354 - coveralls -b .. -r .. --dump c.report.json
Original file line number Diff line number Diff line change @@ -54,11 +54,8 @@ before_test:
5454test_script :
5555 - echo "Testing..."
5656 - cd %APPVEYOR_BUILD_FOLDER%\test
57- - lua test_easy.lua
58- - lua test_safe.lua
59- - lua test_form.lua
57+ - lua run.lua
6058 - lua test_pause02.c.lua
61- - lua test_curl.lua
6259
6360after_test :
6461 - cd %APPVEYOR_BUILD_FOLDER%
Original file line number Diff line number Diff line change 88-- This file is part of Lua-cURL library.
99--
1010
11+ local module_info = {
12+ _NAME = " Lua-cURL" ;
13+ _VERSION = " 0.3.3-dev" ;
14+ _LICENSE = " MIT" ;
15+ _COPYRIGHT = " Copyright (c) 2014 Alexey Melnichuk" ;
16+ }
17+
1118local function clone (t , o )
1219 o = o or {}
1320 for k ,v in pairs (t ) do o [k ]= v end
@@ -691,7 +698,7 @@ function cURL.multi(...) return Multi:new(...) end
691698end
692699
693700return function (curl )
694- local cURL = {}
701+ local cURL = clone ( module_info )
695702
696703 Load_cURLv3 (cURL , curl )
697704
Original file line number Diff line number Diff line change 88
99lunit = require " lunit"
1010
11- local ok , curl = pcall (require , " lcurl " )
11+ local ok , curl = pcall (require , " cURL " )
1212local version if ok then
1313 version = curl .version ()
1414else
1515 version = " <UNKNOWN>"
1616end
1717
1818print (" ------------------------------------" )
19- print (" Lua version: " .. (_G .jit and _G .jit .version or _G ._VERSION ))
20- print (" cURL version: " .. version )
19+ print (" Module name: " .. curl ._NAME );
20+ print (" Module version: " .. curl ._VERSION );
21+ print (" Lua version: " .. (_G .jit and _G .jit .version or _G ._VERSION ))
22+ print (" cURL version: " .. version )
2123print (" ------------------------------------" )
2224print (" " )
2325
Original file line number Diff line number Diff line change @@ -20,6 +20,15 @@ local fname = "./test.download"
2020
2121local ENABLE = true
2222
23+ local _ENV = TEST_CASE ' version' if ENABLE then
24+
25+ function test ()
26+ assert_match (" ^%d+%.%d+%.%d+%-?" , curl ._VERSION )
27+ assert_equal (" Lua-cURL" , curl ._NAME )
28+ end
29+
30+ end
31+
2332local _ENV = TEST_CASE ' easy' if ENABLE then
2433
2534local e1 , e2
Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ local upath = require "path".new('/')
2020local url = " http://example.com"
2121local fname = " ./test.download"
2222
23- print (" ------------------------------------" )
24- print (" Lua version: " .. (_G .jit and _G .jit .version or _G ._VERSION ))
25- print (" cURL version: " .. curl .version ())
26- print (" ------------------------------------" )
27- print (" " )
23+ -- print("------------------------------------")
24+ -- print("Lua version: " .. (_G.jit and _G.jit.version or _G._VERSION))
25+ -- print("cURL version: " .. curl.version())
26+ -- print("------------------------------------")
27+ -- print("")
2828
2929local function weak_ptr (val )
3030 return setmetatable ({value = val },{__mode = ' v' })
You can’t perform that action at this time.
0 commit comments