Diff options
Diffstat (limited to 'tests/extensions/test-syntax-highlight.lua')
| -rw-r--r-- | tests/extensions/test-syntax-highlight.lua | 4 |
1 file changed, 4 insertions, 0 deletions
diff --git a/tests/extensions/test-syntax-highlight.lua b/tests/extensions/test-syntax-highlight.lua index a0debc6..8acbf91 100644 --- a/tests/extensions/test-syntax-highlight.lua +++ b/tests/extensions/test-syntax-highlight.lua @@ -23,9 +23,12 @@ if mode == "nolexers" then local out, ret = render("hello.fake", "if 42") h.equals("without lexers source is served escaped", out, "if 42") h.equals("close answers zero", ret, 0) + h.contains("and the error log says the lexers would not load", h.error_log(), + "Unable to load the Scintillua lexers") out = render("hello.fake", "a <b> & c") h.equals("the fallback escapes markup", out, "a <b> & c") + h.equals("and the error log hears of it only once", h.error_log(), "") -- Large output leaves in slices, and a byte lost at a boundary would -- put the line numbers beside it out of step, so the whole escaped @@ -48,6 +51,7 @@ if mode == "nolexers" then end local out, ret = render("hello.fake", "if 42 'hi' & zz") +h.equals("loaded lexers leave the error log empty", h.error_log(), "") h.contains("keywords are wrapped in their class", out, "<span class='hl-keyword'>if</span>") h.contains("numbers are wrapped in their class", out, "<span class='hl-number'>42</span>") h.contains("a dotted tag maps by its first component", out, "<span class='hl-string'>'hi'</span>") |
