added travis; moved rockspecs; tests and docs modified

This commit is contained in:
Vadim A. Misbakh-Soloviov
2017-04-09 13:15:06 +07:00
parent 06da2e960e
commit a04ab7d9cd
11 changed files with 252 additions and 6 deletions

50
tst/.luacov Normal file
View File

@@ -0,0 +1,50 @@
--- Global configuration file. Copy, customize and store in your
-- project folder as '.luacov' for project specific configuration
-- @class module
-- @name luacov.defaults
return {
-- default filename to load for config options if not provided
-- only has effect in 'luacov.defaults.lua'
configfile = ".luacov",
-- filename to store stats collected
statsfile = "luacov.stats.out",
-- filename to store report
reportfile = "luacov.report.json",
-- Run reporter on completion? (won't work for ticks)
runreport = false,
-- Delete stats file after reporting?
deletestats = false,
-- Patterns for files to include when reporting
-- all will be included if nothing is listed
-- (exclude overrules include, do not include
-- the .lua extension)
include = {
"/foo$",
"/foo/.+$",
},
-- Patterns for files to exclude when reporting
-- all will be included if nothing is listed
-- (exclude overrules include, do not include
-- the .lua extension)
exclude = {
},
-- configuration for luacov-coveralls reporter
coveralls = {
-- debug = true;
pathcorrect = {
{"^.-/share/lua/5.%d/", "src/lua/"};
},
},
}

View File

@@ -1,7 +1,21 @@
-- Omit next line in actual module clients; it's only to support development of the module itself
package.path = "../src/?.lua;" .. package.path
local lunitx = require("lunitx")
pcall(require, "luacov")
print("------------------------------------")
print("Lua version: " .. (jit and jit.version or _VERSION))
print("------------------------------------")
print("")
local HAS_RUNNER = not not lunitx
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 htmlparser = require("htmlparser")