Artifact 85b30eaef751dee7e642eb61c1cf5b1e7bdfae88681ea24be40a5f69b73a53bf:
- File
internal/fsltype/printf_test.go
— part of check-in
[087e1c7ce3]
at
2026-10-18 21:49:37
on branch feat/submanifest-reader
— fix(manifest): derive the event rows fossil derives for tags and attachments
A control artifact's 'g' event comment now matches fossil byte for byte: each target introduced by an Edit link, changes sorted by target hash and full tag name, sym- tags named as tags, a branch move linked to its timeline with its own sym- changes left out, values HTML-escaped, no leading space. tag.InsertControlEvent owns the row, and AddTag writes it, as fossil's tag add does; it was missing until a rebuild or clone.
Attachment comments link the attached artifact and the ticket or tech note as fossil 2.28 does, and a deleted attachment's src is NULL. A check-in without a C card gets a NULL event comment. Hash prefixes follow hash-digits up to 64 digits (was capped at 40); the printf helpers move to fsltype so tag, ticket and attachment comments share them.
Fossil-binary oracles: a fossil-made history with tags, branch moves, wiki, tickets, tech notes, forum posts and attachments rebuilt by both, and a go-written history rebuilt by fossil, must give identical event and attachment tables. (user: [email protected], size: 420) [annotate] [blame] [check-ins using] [more...]
package fsltype import "testing" func TestHTTPize(t *testing.T) { if got, want := HTTPize("mo ved&/x.$~-_Az9é"), "mo+ved%26%2Fx.$~-_Az9%C3%A9"; got != want { t.Errorf("HTTPize = %q, want %q", got, want) } } func TestHTMLize(t *testing.T) { if got, want := HTMLize(`<a href="x">'&'</a>`), "<a href="x">'&'</a>"; got != want { t.Errorf("HTMLize = %q, want %q", got, want) } }