Diff options
Diffstat (limited to '')
-rw-r--r--tests/extensions/test-syntax-highlight.lua13
1 file changed, 3 insertions, 10 deletions
diff --git a/tests/extensions/test-syntax-highlight.lua b/tests/extensions/test-syntax-highlight.lua
index 50c7bc8..a0debc6 100644
--- a/tests/extensions/test-syntax-highlight.lua
+++ b/tests/extensions/test-syntax-highlight.lua
@@ -70,10 +70,9 @@ h.equals("a lexer stopping early leaves an escaped tail", out, "<span class='hl-
out = render("boom.badlex", "some <code>")
h.equals("a lexer that raises falls back to escaped text", out, "some &lt;code&gt;")
--- The viadetect lexer name only resolves through detect(), so highlighted
--- output proves the detection path ran ahead of the extension path.
-out = render("script.viadetect", "if")
-h.equals("filename detection picks the lexer", out, "<span class='hl-keyword'>if</span>")
+out = render("HELLO.FAKE", "if 42")
+h.contains("an extension in capitals finds its lexer", out,
+ "<span class='hl-keyword'>if</span>")
out = render("post-receive", "#!/usr/bin/fake\nif")
h.contains("a shebang picks the lexer of a file with no extension", out,
@@ -111,10 +110,4 @@ out, ret = render("empty.fake", "")
h.equals("an empty blob renders empty", out, "")
h.equals("an empty blob still answers zero", ret, 0)
--- cgit's C sink stops at the first NUL byte, which the script documents for
--- binaries that slip past the text detection.
-out = render("blob.bin", "ab\0cd")
-h.contains("bytes before a nul survive", out, "ab")
-h.excludes("bytes after a nul are dropped", out, "cd")
-
h.finish()