From 809b90d0d876a7a81db85c7460bf24edfad7b439 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 11:10:57 -1000 Subject: 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. --- tests/extensions/test-link-trailers.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/extensions') 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, "1234567") out = render("Fixes", "123456") -h.excludes("six hex characters stay text", out, "cafebabe") @@ -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, "1234567 tail") -- cgit 2.12.1