improve tests

pull/13/head
ruki 6 years ago
parent eb00f1c88b
commit bd89083dfc
No known key found for this signature in database
GPG Key ID: 33341DF9719963FA
  1. 2
      packages/p/pcre/xmake.lua
  2. 2
      packages/p/pcre2/xmake.lua
  3. 9
      packages/t/tbox/xmake.lua

@ -62,5 +62,5 @@ package("pcre")
on_test(function (package)
local bitwidth = package:config("bitwidth") or "8"
local testfunc = string.format("pcre%s_compile", bitwidth ~= "8" and bitwidth or "")
assert(import("lib.detect.has_cfuncs")(testfunc, {configs = package:fetch(), includes = "pcre.h", links = package:get("links")}))
assert(import("lib.detect.has_cfuncs")(testfunc, {configs = package:fetch(), includes = "pcre.h"}))
end)

@ -64,5 +64,5 @@ package("pcre2")
end)
on_test(function (package)
assert(import("lib.detect.has_cfuncs")("pcre2_compile", {configs = package:fetch(), includes = "pcre2.h", links = package:get("links")}))
assert(import("lib.detect.has_cfuncs")("pcre2_compile", {configs = package:fetch(), includes = "pcre2.h"}))
end)

@ -23,6 +23,13 @@ package("tbox")
if package:debug() then
package:add("defines", "__tb_debug__")
end
if package:plat() == "windows" then
package:add("syslinks", "ws2_32")
elseif package:plat() == "mingw" then
package:add("syslinks", "ws2_32", "pthread")
else
package:add("syslinks", "pthread")
end
end)
on_install(function (package)
@ -44,5 +51,5 @@ package("tbox")
end)
on_test(function (package)
assert(import("lib.detect.has_cfuncs")("tb_exit", {configs = package:fetch(), includes = "tbox/tbox.h", links = "tbox"}))
assert(import("lib.detect.has_cfuncs")("tb_exit", {configs = package:fetch(), includes = "tbox/tbox.h"}))
end)

Loading…
Cancel
Save