summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-05-13 11:08:51 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2017-05-13 11:08:51 +0100
commit24e3686cdc8b7b55959b3d3747f1f4ae93fd5258 (patch)
tree9ba4d4e9d1f489897626b2724b2526c9418735d4
parentb3cb265c28906c21007adcae3ba28ea345fc7def (diff)
downloadlace-24e3686cdc8b7b55959b3d3747f1f4ae93fd5258.tar.gz
Remove obsolete tests
-rw-r--r--test/test-lace.engine-unknownanyof.rules5
-rw-r--r--test/test-lace.engine-unknowndefine.rules3
-rw-r--r--test/test-lace.engine.lua26
3 files changed, 0 insertions, 34 deletions
diff --git a/test/test-lace.engine-unknownanyof.rules b/test/test-lace.engine-unknownanyof.rules
deleted file mode 100644
index 2ea2141..0000000
--- a/test/test-lace.engine-unknownanyof.rules
+++ /dev/null
@@ -1,5 +0,0 @@
--- Expect error at line 5 word 3
-
-define fish anyof pants cake
-
-allow anyway fish
diff --git a/test/test-lace.engine-unknowndefine.rules b/test/test-lace.engine-unknowndefine.rules
deleted file mode 100644
index 42a2fc5..0000000
--- a/test/test-lace.engine-unknowndefine.rules
+++ /dev/null
@@ -1,3 +0,0 @@
--- Expect error on line 3, word 2
-
-allow anyway fish
diff --git a/test/test-lace.engine.lua b/test/test-lace.engine.lua
index 5e81f07..feec088 100644
--- a/test/test-lace.engine.lua
+++ b/test/test-lace.engine.lua
@@ -219,32 +219,6 @@ function suite.doubledefine()
assert(line4 == " ^^^^ ", "The fourth line highlights relevant words")
end
-function suite.unknowndefine()
- local ruleset, msg = lace.compiler.compile(comp_context, "unknowndefine")
- assert(type(ruleset) == "table", "Ruleset did not compile")
- local ectx = {error = true}
- local result, msg = lace.engine.run(ruleset, ectx)
- assert(result == false, "Did not error out")
- local line1, line2, line3, line4 = msg:match("^([^\n]*)\n([^\n]*)\n([^\n]*)\n([^\n]*)$")
- assert(line1:find("definition: fish"), "The first line must mention the error")
- assert(line2 == "real-unknowndefine :: 3", "The second line is where the error happened")
- assert(line3 == "allow anyway fish", "The third line is the original line")
- assert(line4 == " ^^^^", "The fourth line highlights relevant words")
-end
-
-function suite.unknownanyof()
- local ruleset, msg = lace.compiler.compile(comp_context, "unknownanyof")
- assert(type(ruleset) == "table", "Ruleset did not compile")
- local ectx = {error = true}
- local result, msg = lace.engine.run(ruleset, ectx)
- assert(result == false, "Did not error out")
- local line1, line2, line3, line4 = msg:match("^([^\n]*)\n([^\n]*)\n([^\n]*)\n([^\n]*)$")
- assert(line1:find("definition: pants"), "The first line must mention the error")
- assert(line2 == "real-unknownanyof :: 5", "The second line is where the error happened")
- assert(line3 == "allow anyway fish", "The third line is the original line")
- assert(line4 == " ^^^^", "The fourth line highlights relevant words")
-end
-
function suite.subdefine_works()
local ruleset, msg = lace.compiler.compile(comp_context, "subdefine-works")
assert(type(ruleset) == "table", "Ruleset did not compile")