diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Ship the example tracker links commented out
An unedited copy sent every #123, Closes: and Bug: mark to
bugs.example.com, a link that is wrong for every site.
Diffstat (limited to '')
| -rw-r--r-- | tests/extensions/test-link-trailers.lua | 16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 12 insertions, 4 deletions
diff --git a/tests/extensions/test-link-trailers.lua b/tests/extensions/test-link-trailers.lua index c879340..7aed9d2 100644 --- a/tests/extensions/test-link-trailers.lua +++ b/tests/extensions/test-link-trailers.lua @@ -1,9 +1,10 @@ -- Unit checks for custom/extensions/link-trailers.lua, run under a standalone -- Lua by t0506-link-trailers.sh with the script path as the argument. The --- shipped configuration links Fixes and Reverts object names to ./?id=, --- Closes and Bug marks to bugs.example.com and a bare URL to itself, and --- everything here checks that shape, the key matching and the values that --- must pass through untouched. +-- shipped configuration links Fixes and Reverts object names to ./?id= and a +-- bare URL to itself, and leaves Closes and Bug marks as text. The rest runs +-- with the commented-out tracker rules switched on, linking those marks to +-- bugs.example.com, and checks that shape, the key matching and the values +-- that must pass through untouched. local test_directory = arg[0]:match("^(.*)/") or "." local h = dofile(test_directory .. "/harness.lua") @@ -14,6 +15,13 @@ local function render(key, text) return h.run({ key, "commit" }, { text }) end +h.equals("an unedited copy leaves a Closes mark as text", render("Closes", "#45"), "#45") + +h.load_with(arg[1], { + { "-- { key = \"Closes\"", "{ key = \"Closes\"" }, + { "-- { key = \"Bug\"", "{ key = \"Bug\"" }, +}) + local out, ret = render("Fixes", "1234567 (\"plain commit\")") h.contains("a Fixes object name links to its commit", out, "<a href='./?id=1234567'>1234567</a> (\"plain commit\")") |
