mirror of
https://github.com/TangentFoxy/lua-htmlparser.git
synced 2025-07-28 02:52:19 +00:00
added travis; moved rockspecs; tests and docs modified
This commit is contained in:
50
tst/.luacov
Normal file
50
tst/.luacov
Normal 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/"};
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
}
|
16
tst/init.lua
16
tst/init.lua
@@ -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")
|
||||
|
Reference in New Issue
Block a user