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%
142
142
143
143
:: Lua will use just the system rocks
144
144
set LUA_PATH = %LR_ROOT% \lua\?.lua;%LR_ROOT% \lua\?\init.lua
145
+ set LUA_PATH = %LUA_PATH% ;.\?.lua;
145
146
set LUA_PATH = %LUA_PATH% ;%LR_SYSTREE% \share\lua\%LUA_SHORTV% \?.lua
146
147
set LUA_PATH = %LUA_PATH% ;%LR_SYSTREE% \share\lua\%LUA_SHORTV% \?\init.lua
147
148
set 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:
43
43
script :
44
44
- cd test
45
45
- 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
51
52
52
53
after_success :
53
54
- coveralls -b .. -r .. --dump c.report.json
Original file line number Diff line number Diff line change @@ -54,11 +54,8 @@ before_test:
54
54
test_script :
55
55
- echo "Testing..."
56
56
- cd %APPVEYOR_BUILD_FOLDER%\test
57
- - lua test_easy.lua
58
- - lua test_safe.lua
59
- - lua test_form.lua
57
+ - lua run.lua
60
58
- lua test_pause02.c.lua
61
- - lua test_curl.lua
62
59
63
60
after_test :
64
61
- cd %APPVEYOR_BUILD_FOLDER%
Original file line number Diff line number Diff line change 8
8
-- This file is part of Lua-cURL library.
9
9
--
10
10
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
+
11
18
local function clone (t , o )
12
19
o = o or {}
13
20
for k ,v in pairs (t ) do o [k ]= v end
@@ -691,7 +698,7 @@ function cURL.multi(...) return Multi:new(...) end
691
698
end
692
699
693
700
return function (curl )
694
- local cURL = {}
701
+ local cURL = clone ( module_info )
695
702
696
703
Load_cURLv3 (cURL , curl )
697
704
Original file line number Diff line number Diff line change 8
8
9
9
lunit = require " lunit"
10
10
11
- local ok , curl = pcall (require , " lcurl " )
11
+ local ok , curl = pcall (require , " cURL " )
12
12
local version if ok then
13
13
version = curl .version ()
14
14
else
15
15
version = " <UNKNOWN>"
16
16
end
17
17
18
18
print (" ------------------------------------" )
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 )
21
23
print (" ------------------------------------" )
22
24
print (" " )
23
25
Original file line number Diff line number Diff line change @@ -20,6 +20,15 @@ local fname = "./test.download"
20
20
21
21
local ENABLE = true
22
22
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
+
23
32
local _ENV = TEST_CASE ' easy' if ENABLE then
24
33
25
34
local e1 , e2
Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ local upath = require "path".new('/')
20
20
local url = " http://example.com"
21
21
local fname = " ./test.download"
22
22
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("")
28
28
29
29
local function weak_ptr (val )
30
30
return setmetatable ({value = val },{__mode = ' v' })
You can’t perform that action at this time.
0 commit comments