diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-05-13 19:42:24 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-05-13 19:42:24 +0100 |
commit | b61d840109f44692312ba952db009adba76fa727 (patch) | |
tree | e852379881cb986e9028049db1b42efe54a8bf6d /test/test-lace.compiler.lua | |
parent | e73d054eab36b6f7e34c85826be5490ed31f5e78 (diff) | |
download | lace-b61d840109f44692312ba952db009adba76fa727.tar.gz |
Verify reasons for compilation failures make their way back to the caller
Diffstat (limited to 'test/test-lace.compiler.lua')
-rw-r--r-- | test/test-lace.compiler.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test-lace.compiler.lua b/test/test-lace.compiler.lua index 7b1c641..5c5c843 100644 --- a/test/test-lace.compiler.lua +++ b/test/test-lace.compiler.lua @@ -116,6 +116,12 @@ function suite.load_file_with_disabled_command() assert(msg:match("is disabled by"), "Error returned did not match the bad command") end +function suite.load_file_with_bad_deny_command() + local result, msg = compiler.compile(comp_context, "denynoreason") + assert(result == false, "Internal errors should return false") + assert(msg:match("got nothing"), "Error returned did not match expected behaviour from deny") +end + function suite.load_file_with_one_command() local result, msg = compiler.compile(comp_context, "denyall") assert(type(result) == "table", "Loading a ruleset should result in a table") |