mirror of
https://github.com/msva/lua-htmlparser.git
synced 2024-11-27 12:44:22 +00:00
fix tests
This commit is contained in:
parent
c943629e1f
commit
a7ae1ec77b
@ -28,9 +28,10 @@ install:
|
|||||||
- luarocks make rockspecs/htmlparser-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"
|
- luarocks make rockspecs/htmlparser-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd tst
|
# - cd tst
|
||||||
- lua -e "print(require'cURL'.version())"
|
- lua -e "print(require'cURL'.version())"
|
||||||
- lunit.sh init.lua
|
# - lunit.sh init.lua
|
||||||
|
- lua -l tst -e ""
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls -b .. -r .. -i ./src --dump c.report.json
|
- coveralls -b .. -r .. -i ./src --dump c.report.json
|
||||||
|
13
tst/init.lua
13
tst/init.lua
@ -8,16 +8,19 @@ print("Lua version: " .. (jit and jit.version or _VERSION))
|
|||||||
print("------------------------------------")
|
print("------------------------------------")
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
local HAS_RUNNER = not not lunitx
|
local HAS_RUNNER = not not lunit
|
||||||
local lunitx = require("lunitx")
|
local lunitx
|
||||||
|
if not HAS_RUNNER then
|
||||||
|
lunitx = require"lunitx"
|
||||||
|
else
|
||||||
|
lunitx = require"lunit"
|
||||||
|
end
|
||||||
local TEST_CASE = lunitx.TEST_CASE
|
local TEST_CASE = lunitx.TEST_CASE
|
||||||
|
|
||||||
local LUA_VER = _VERSION
|
local LUA_VER = _VERSION
|
||||||
local unpack, pow, bit32 = unpack, math.pow, bit32
|
local unpack, pow, bit32 = unpack, math.pow, bit32
|
||||||
|
|
||||||
local _ENV = TEST_CASE"some_test_case"
|
local _ENV = TEST_CASE"html"
|
||||||
|
|
||||||
module("html", lunitx.testcase, package.seeall)
|
|
||||||
|
|
||||||
local htmlparser = require("htmlparser")
|
local htmlparser = require("htmlparser")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user