Skip to content
quarry Artifact [1447af5cdd]
Login

Artifact [1447af5cdd]

Artifact 1447af5cdde8209a2c3505ca8fb2c8a40bb259fede7197454ff71d82fe09dcb7:


package web

import "testing"

// A note fossil attaches to a check-in, branch or tag reads by its kind
// and a short key in the docs lists, not as a 64-digit path; any other
// page name is shown as it is.
func TestWikiLabelReadsAttachedNotes(t *testing.T) {
	for in, want := range map[string]string{
		"checkin/2dfd42319fc08f68643dbf0c24e8a315269281f47632320f15574ac18fea2391": "check-in 2dfd42319f",
		"branch/core-8-6-branch": "branch core-8-6-branch",
		"tag/release":            "tag release",
		"Audit after change":     "Audit after change",
		"notes/2026":             "notes/2026",
		"checkin/":               "checkin/",
	} {
		if got := wikiLabel(in); got != want {
			t.Errorf("FAIL: wikiLabel(%q) = %q, want %q", in, got, want)
		}
	}
}