forked from civboot/civstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.lua
More file actions
70 lines (56 loc) · 2 KB
/
test.lua
File metadata and controls
70 lines (56 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
local G = G or _G
G.MAIN = {}
-- for early tests / libs to log
G.LOGLEVEL = tonumber(os.getenv'LOGLEVEL') or 4
G.LOGFN = function(lvl, msg) if LOGLEVEL >= lvl then
io.stderr:write(string.format('LOG(%s): %s\n', lvl, msg))
end end
assert(not os.execute'ls lua*.core', 'lua.*core file found!!')
local io_open = io.open
local dir = '' -- leave here incase support is needed for filedir
print'[[core]]'
dofile(dir..'lib/metaty/test.lua')
require'asciicolor'.setup()
dofile(dir..'lib/fmt/test.lua')
dofile(dir..'lib/civtest/test.lua')
local log = require'ds.log'
LOGFN = log.logFn; log.setLevel()
local tests = os.getenv'tests' -- do these first
if tests then
for tpath in tests:gmatch'%S+' do dofile(dir..tpath) end
end
dofile(dir..'lib/shim/test.lua')
dofile(dir..'lib/ds/test.lua')
dofile(dir..'lib/lines/test_diff.lua')
dofile(dir..'lib/pod/test.lua')
dofile(dir..'lib/lap/test.lua')
dofile(dir..'lib/fd/test.lua')
dofile(dir..'lib/lines/test.lua')
dofile(dir..'lib/lines/test_motion.lua')
dofile(dir..'lib/lines/test_buffer.lua')
dofile(dir..'lib/lines/test_file.lua')
assert(io_open == io.open)
print'[[libs]]'
dofile(dir..'lib/asciicolor/test.lua')
dofile(dir..'lib/acsyntax/test.lua')
dofile(dir..'lib/vt100/test.lua')
dofile(dir..'lib/lson/test.lua')
dofile(dir..'lib/vcds/test.lua')
dofile(dir..'lib/pegl/tests/test_pegl.lua')
dofile(dir..'lib/pegl/tests/test_lua.lua')
dofile(dir..'lib/civix/test.lua')
dofile(dir..'lib/smol/test.lua')
print'[[apps]]'
dofile(dir..'cmd/doc/test.lua')
dofile(dir..'cmd/cxt/test.lua')
dofile(dir..'cmd/ff/test.lua')
dofile(dir..'cmd/pvc/test.lua')
print'[[os]]'
dofile(dir..'os/iA/test.lua')
print'[[ele]]'
dofile(dir..'cmd/ele/tests/test_term.lua')
dofile(dir..'cmd/ele/tests/test_bindings.lua')
dofile(dir..'cmd/ele/tests/test_actions.lua')
dofile(dir..'cmd/ele/tests/test_session.lua')
assert(not os.execute'ls lua*.core', 'lua.*core file found!!')
io.fmt:styled('notify', '\nSuccess! All tests passed', '\n')