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.lua40
1 files changed, 20 insertions, 20 deletions
diff --git a/test/test-lace.builtin.lua b/test/test-lace.builtin.lua
index 927acb1..84499a3 100644
--- a/test/test-lace.builtin.lua
+++ b/test/test-lace.builtin.lua
@@ -55,10 +55,10 @@ function suite.compile_builtin_allow_deny_novariables()
assert(type(cmdtab) == "table", "Result should be a table")
assert(type(cmdtab.fn) == "function", "Result should contain a function")
assert(type(cmdtab.args) == "table", "Result table should contain an args table")
- assert(cmdtab.args[1] == "allow", "Result args table should contain the given result 'allow'")
- assert(cmdtab.args[2] == "because", "Result args table should contain te given reason 'because'")
- assert(type(cmdtab.args[3]) == "table", "The third argument should be a table")
- assert(#cmdtab.args[3] == 0, "There should be no conditions")
+ assert(cmdtab.args[2] == "allow", "Result args table should contain the given result 'allow'")
+ assert(cmdtab.args[3] == "because", "Result args table should contain te given reason 'because'")
+ assert(type(cmdtab.args[4]) == "table", "The third argument should be a table")
+ assert(#cmdtab.args[4] == 0, "There should be no conditions")
end
function suite.run_builtin_allow_deny_novariables()
@@ -536,17 +536,17 @@ function suite.compile_anyof_two_args()
assert(type(cmdtab) == "table", "Successful compilations should return tables")
assert(type(cmdtab.fn) == "function", "With functions")
assert(type(cmdtab.args) == "table", "And arguments")
- assert(#cmdtab.args == 2, "There should be two args")
- assert(type(cmdtab.args[1]) == "string", "The first should be a table")
- assert(type(cmdtab.args[2]) == "table", "The second should be a bool")
- local ctrltab = cmdtab.args[2]
+ assert(#cmdtab.args == 3, "There should be two args")
+ assert(type(cmdtab.args[2]) == "string", "The first should be a table")
+ assert(type(cmdtab.args[3]) == "table", "The second should be a bool")
+ local ctrltab = cmdtab.args[3]
assert(type(ctrltab) == "table", "Successfully compiled control functions should return tables")
assert(type(ctrltab.fn) == "function", "With functions")
assert(type(ctrltab.args) == "table", "And arguments")
- assert(#ctrltab.args == 2, "There should be two args")
- assert(type(ctrltab.args[1]) == "table", "The first should be a table")
- assert(type(ctrltab.args[2]) == "boolean", "The second should be a bool")
- assert(ctrltab.args[2] == true, "The anyof indicator should be true")
+ assert(#ctrltab.args == 3, "There should be two args")
+ assert(type(ctrltab.args[2]) == "table", "The first should be a table")
+ assert(type(ctrltab.args[3]) == "boolean", "The second should be a bool")
+ assert(ctrltab.args[3] == true, "The anyof indicator should be true")
end
function suite.compile_allof_two_args()
@@ -555,17 +555,17 @@ function suite.compile_allof_two_args()
assert(type(cmdtab) == "table", "Successful compilations should return tables")
assert(type(cmdtab.fn) == "function", "With functions")
assert(type(cmdtab.args) == "table", "And arguments")
- assert(#cmdtab.args == 2, "There should be two args")
- assert(type(cmdtab.args[1]) == "string", "The first should be a table")
- assert(type(cmdtab.args[2]) == "table", "The second should be a bool")
- local ctrltab = cmdtab.args[2]
+ assert(#cmdtab.args == 3, "There should be two args")
+ assert(type(cmdtab.args[2]) == "string", "The first should be a table")
+ assert(type(cmdtab.args[3]) == "table", "The second should be a bool")
+ local ctrltab = cmdtab.args[3]
assert(type(ctrltab) == "table", "Successfully compiled control functions should return tables")
assert(type(ctrltab.fn) == "function", "With functions")
assert(type(ctrltab.args) == "table", "And arguments")
- assert(#ctrltab.args == 2, "There should be two args")
- assert(type(ctrltab.args[1]) == "table", "The first should be a table")
- assert(type(ctrltab.args[2]) == "boolean", "The second should be a bool")
- assert(ctrltab.args[2] == false, "The anyof indicator should be false")
+ assert(#ctrltab.args == 3, "There should be two args")
+ assert(type(ctrltab.args[2]) == "table", "The first should be a table")
+ assert(type(ctrltab.args[3]) == "boolean", "The second should be a bool")
+ assert(ctrltab.args[3] == false, "The anyof indicator should be false")
end
function suite.run_anyof_two_args()