aboutsummaryrefslogtreecommitdiff
path: root/spec/quick_spec.lua
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-02-21 22:30:40 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-02-23 04:33:35 -0300
commit79bd1739d8ca004ddd0b2fa5e24da4a6f4b776fa (patch)
treeb8ead4801340bd958fccbcb97c35cc7d463f2435 /spec/quick_spec.lua
parenta75d447e10bb7842cdbed0bb494697ddd88fd455 (diff)
downloadluarocks-79bd1739d8ca004ddd0b2fa5e24da4a6f4b776fa.tar.gz
luarocks-79bd1739d8ca004ddd0b2fa5e24da4a6f4b776fa.tar.bz2
luarocks-79bd1739d8ca004ddd0b2fa5e24da4a6f4b776fa.zip
tests: introduce quick tests
Diffstat (limited to 'spec/quick_spec.lua')
-rw-r--r--spec/quick_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/quick_spec.lua b/spec/quick_spec.lua
new file mode 100644
index 00000000..8b8206cf
--- /dev/null
+++ b/spec/quick_spec.lua
@@ -0,0 +1,20 @@
1local lfs = require("lfs")
2local test_env = require("spec.util.test_env")
3local quick = require("spec.util.quick")
4
5describe("quick tests: #quick", function()
6 before_each(function()
7 test_env.setup_specs()
8 end)
9
10 local spec_quick = test_env.testing_paths.spec_dir .. "/quick"
11 for f in lfs.dir(spec_quick) do
12 if f:match("%.q$") then
13 local tests = quick.compile(spec_quick .. "/" .. f, getfenv and getfenv() or _ENV)
14 for _, t in ipairs(tests) do
15 it(t.name, t.fn)
16 end
17 end
18 end
19end)
20