-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.lua
More file actions
executable file
·25 lines (21 loc) · 861 Bytes
/
test.lua
File metadata and controls
executable file
·25 lines (21 loc) · 861 Bytes
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
#!/usr/bin/env -S pandoc lua
-- Luacov (for coverage analysis) is installed locally, as there currently is no Arch package available.
-- The local location needs to be added to the search path.
local home = os.getenv('HOME')
package.path = home
.. '/.luarocks/share/lua/5.4/?.lua;'
.. home
.. '/.luarocks/share/lua/5.4/?/init.lua;'
.. package.path
package.cpath = home .. '/.luarocks/lib/lua/5.4/?.so;' .. package.cpath
-- Remove `--accept` option if passed so that busted doesn't complain.
arg = pandoc.List(arg):filter(function(arg) -- luacheck: ignore 121
if arg == '--accept' then
ACCEPT_TEST_RESULTS = true -- luacheck: ignore 111
return false
end
return true
end)
-- Delete `luacov.stats.out`, otherwise the coverage will only be added to.
os.remove('luacov.stats.out')
require('busted.runner') { standalone = false }