Artifact f6cfc8a19b1c7b5268ec86cae6527248cedbaf8e03b943bbd021003e9688d209:
- File
conformance/repostate_eventtags_test.go
— part of check-in
[8cc3d7c5e4]
at
2026-10-13 02:23:50
on branch test/conformance-01-drafts
— test(conformance): check the -01 drafts of artifact, repo-state and sync
Re-pin the conformance suite to draft-fossil-artifact-format-01, draft-fossil-repo-state-01 and draft-fossil-sync-protocol-01, copied byte for byte from zit check-in 100351e26c. The delta format has no -01 and stays on -00. The -00 errata are folded into -01 and are no longer pinned; the six -01 errata are pinned for the fossil 2.28 behavior they record. conformance/rfcs/README.md records where each copy came from.
The requirement tables are re-read against -01, and new cases cover the date tag's event time (repo-state ยง4.2 step 6), the Julian-day grammar, a delta manifest naming a delta, dropped reserved F cards, the trailing-punctuation retry, truncated payloads, errors N, a file card after a refused push, the end of a request after a failed login, and the answer to a gimme for private content.
No library behavior changes. Where -01 departs from fossil 2.28 and go-libfossil follows fossil (a cancelled, unparsable or 0 date tag), the cases are marked as deviations. The non-conformances the re-pin exposes are marked as gaps, tracked in #370, #371, #372, #373, #374 and #375. (user: [email protected], size: 2379) [annotate] [blame] [check-ins using] [more...]
package conformance import "testing" // The bgcolor, user and comment tags override a check-in's derived event row // (bgcolor, euser, ecomment), whatever the tag's type, and a cancel clears // the column. fossil(1) does this in tag_insert when the tag arrives after // the check-in and in manifest_crosslink when it arrived first, while the // check-in was still a phantom. draft-fossil-repo-state-01 does not describe // these columns, so the cases name no requirement and stay out of the // coverage audit, with fossil(1) as their reference. // eventTagCase compares the bgcolor, euser and ecomment of the check-ins. func eventTagCase(id string, arts []rsArt, want []string, ignoring ...string) rsCase { return rsCase{ Case: Case{ID: id}, arts: arts, tables: []string{"eventcols"}, want: rows("eventcols", want...), ignoring: ignoring, rebuild: true, each: true, } } func eventTagCases() []rsCase { base := chain()[:2] none := "NULL NULL NULL" return []rsCase{ eventTagCase("repostate.fossil.bgcolor-singleton", with(base, control("t", 9, "+bgcolor {c2} red")), []string{"c1 " + none, "c2 'red' NULL NULL"}, "-eventcols: c2 'red' NULL NULL", "+eventcols: c2 "+none), eventTagCase("repostate.fossil.bgcolor-propagating", with(chain(), control("t", 9, "*bgcolor {c2} red")), []string{"c1 " + none, "c2 'red' NULL NULL", "c3 'red' NULL NULL", "c4 'red' NULL NULL"}, "-eventcols: c3 'red' NULL NULL", "+eventcols: c3 "+none), eventTagCase("repostate.fossil.bgcolor-cancel", with(chain()[:3], control("t1", 8, "*bgcolor {c2} red"), control("t2", 9, "-bgcolor {c2}")), []string{"c1 " + none, "c2 " + none, "c3 " + none}, "-eventcols: c2 "+none, "+eventcols: c2 'red' NULL NULL"), eventTagCase("repostate.fossil.user-tag", with(base, control("t", 9, "+user {c2} bob")), []string{"c1 " + none, "c2 NULL 'bob' NULL"}, "-eventcols: c2 NULL 'bob' NULL", "+eventcols: c2 "+none), eventTagCase("repostate.fossil.comment-tag", with(base, control("t", 9, "+comment {c2} reworded")), []string{"c1 " + none, "c2 NULL NULL 'reworded'"}, "-eventcols: c2 NULL NULL 'reworded'", "+eventcols: c2 "+none), } } func TestRepoStateEventTags(t *testing.T) { runRepoStateCases(t, eventTagCases()) } func TestRepoStateEventTagsReasons(t *testing.T) { checkRepoStateReasons(t, eventTagCases()) }