diff --git a/.travis.yml b/.travis.yml index 8377480..4fd0aff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tst/init.lua b/tst/init.lua index 0e0d3da..54d0dfd 100644 --- a/tst/init.lua +++ b/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")