Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Compare link-trailers output whole
A short object name was checked only for a missing anchor, and the
value that passes through untouched never held the entities cgit
escapes it with, so escaping it again would have passed.
Diffstat (limited to 'tests/extensions/test-link-trailers.lua')
| -rw-r--r-- | tests/extensions/test-link-trailers.lua | 6 |
1 file changed, 5 insertions, 1 deletion
diff --git a/tests/extensions/test-link-trailers.lua b/tests/extensions/test-link-trailers.lua index 7912d3e..6cac11c 100644 --- a/tests/extensions/test-link-trailers.lua +++ b/tests/extensions/test-link-trailers.lua @@ -33,7 +33,7 @@ out = render("fixes", "1234567") h.contains("the key matches case insensitively", out, "<a href='./?id=1234567'>1234567</a>") out = render("Fixes", "123456") -h.excludes("six hex characters stay text", out, "<a") +h.equals("six hex characters stay text", out, "123456") out = render("Reverts", "cafebabe") h.contains("a Reverts object name links too", out, "<a href='./?id=cafebabe'>cafebabe</a>") @@ -65,6 +65,10 @@ h.equals("a URL inside other text stays text", out, "see https://example.com/x") out = render("Reported-by", "someone") h.equals("a key with no rule passes through", out, "someone") +-- cgit hands the value over already escaped. +out = render("Reported-by", "a & b <c>") +h.equals("an escaped value passes through as it came", out, "a & b <c>") + out = h.run({ "Fixes", "commit" }, { "12345", "67 tail" }) h.contains("a value split across writes is seen whole", out, "<a href='./?id=1234567'>1234567</a> tail") |
