| 1 |
local t = require("test.faith") |
| 2 |
|
| 3 |
-- Ensure we don't accidentally set globals when loading or running the compiler |
| 4 |
setmetatable(_G, {__newindex=function(_, k) error("set global "..k) end}) |
| 5 |
|
| 6 |
local oldfennel = require("bootstrap.fennel") |
| 7 |
local opts = {useMetadata = true, correlate = true} |
| 8 |
oldfennel.dofile("src/fennel.fnl").install(opts) |
| 9 |
|
| 10 |
local modules = {"test.core", "test.mangling", "test.quoting", "test.bit", |
| 11 |
"test.fennelview", "test.parser", "test.failures", "test.repl", |
| 12 |
"test.cli", "test.macro", "test.linter", "test.loops", |
| 13 |
"test.misc", "test.searcher", "test.api", "test.sourcemap"} |
| 14 |
|
| 15 |
if(#arg ~= 0 and arg[1] ~= "--eval") then modules = arg end |
| 16 |
|
| 17 |
t.run(modules,{hooks={exit=dofile("test/irc.lua")}}) |