mirror of
https://github.com/msva/lua-htmlparser.git
synced 2024-11-04 23:34:20 +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"
|
||||
|
||||
script:
|
||||
- cd tst
|
||||
# - cd tst
|
||||
- lua -e "print(require'cURL'.version())"
|
||||
- lunit.sh init.lua
|
||||
# - lunit.sh init.lua
|
||||
- lua -l tst -e ""
|
||||
|
||||
after_success:
|
||||
- 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("")
|
||||
|
||||
local HAS_RUNNER = not not lunitx
|
||||
local lunitx = require("lunitx")
|
||||
local HAS_RUNNER = not not lunit
|
||||
local lunitx
|
||||
if not HAS_RUNNER then
|
||||
lunitx = require"lunitx"
|
||||
else
|
||||
lunitx = require"lunit"
|
||||
end
|
||||
local TEST_CASE = lunitx.TEST_CASE
|
||||
|
||||
local LUA_VER = _VERSION
|
||||
local unpack, pow, bit32 = unpack, math.pow, bit32
|
||||
|
||||
local _ENV = TEST_CASE"some_test_case"
|
||||
|
||||
module("html", lunitx.testcase, package.seeall)
|
||||
local _ENV = TEST_CASE"html"
|
||||
|
||||
local htmlparser = require("htmlparser")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user