summaryrefslogtreecommitdiff
path: root/test/test-lace.builtin.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-lace.builtin.lua')
-rw-r--r--test/test-lace.builtin.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/test-lace.builtin.lua b/test/test-lace.builtin.lua
index 4da3bb2..558f15a 100644
--- a/test/test-lace.builtin.lua
+++ b/test/test-lace.builtin.lua
@@ -135,9 +135,7 @@ function suite.compile_builtin_default_ok()
assert(type(cmdtab.args) == "table", "And an arg table")
assert(cmdtab.fn() == true, "Default command should always return true")
assert(type(compctx[".lace"].default) == "table", "Default should always set up the context")
- assert(#compctx[".lace"].default == 2, "Default table should consist of two entries")
- assert(compctx[".lace"].default[1] == "allow", "First entry should be the result")
- assert(compctx[".lace"].default[2] == "because", "Second entry should be the reason")
+ assert(type(compctx[".lace"].default.fn) == "function", "Default table should have a function like a rule")
end
function suite.compile_builtin_default_twice()
@@ -159,9 +157,7 @@ function suite.compile_builtin_default_noreason()
assert(type(cmdtab.args) == "table", "And an arg table")
assert(cmdtab.fn() == true, "Default command should always return true")
assert(type(compctx[".lace"].default) == "table", "Default should always set up the context")
- assert(#compctx[".lace"].default == 2, "Default table should consist of two entries")
- assert(compctx[".lace"].default[1] == "allow", "First entry should be the result")
- assert(compctx[".lace"].default[2] == "Default behaviour", "Second entry should be the reason")
+ assert(type(compctx[".lace"].default.fn) == "function", "Default table should have a function like a rule")
end