Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33

Open
lilleman wants to merge 966 commits from worktree-todo-relative-dates-exact-counts into main
2 changed files with 7 additions and 7 deletions
Showing only changes of commit 0f58784a1b - Show all commits
+6 -7
View File
@@ -9,8 +9,8 @@ import (
func TestPathCheckStopsAtAMissingSegment(t *testing.T) {
n := compiled(t, `{"format":"{a}","a":{"format":"{b}","b":"leaf"}}`)
if leaves := pathLeaves(n, []string{"a", "b"}); len(leaves) != 1 {
t.Fatalf("pathLeaves(a.b) = %v, want the one leaf", leaves)
if leaves := compilePath(n, []string{"a", "b"}).leaves; len(leaves) != 1 {
t.Fatalf("compilePath(a.b).leaves = %v, want the one leaf", leaves)
}
w := &pathCheck{tail: []string{"a", "nope", "deeper"}}
_, err := w.run(n)
@@ -24,16 +24,15 @@ func TestPathCheckStopsAtAMissingSegment(t *testing.T) {
func TestPathCheckChoiceConsumesNoSegment(t *testing.T) {
n := compiled(t, `[{"format":"{f}","f":"1"},{"format":"{f}","f":"2"}]`)
if leaves := pathLeaves(n, []string{"f"}); len(leaves) != 2 {
t.Fatalf("pathLeaves through a choice = %v, want both variants' f", leaves)
if leaves := compilePath(n, []string{"f"}).leaves; len(leaves) != 2 {
t.Fatalf("compilePath through a choice = %v, want both variants' f", leaves)
}
}
func TestPathCoverStopsAtAChoice(t *testing.T) {
n := compiled(t, `[{"format":"{f}","f":"1"},{"format":"{f}","f":"2"}]`)
leaf, err := (&pathCover{into: map[node]bool{}}).walk(n, []string{"f"})
if err != nil || leaf != n {
t.Fatalf("cover through a choice = %v, %v, want the choice itself", leaf, err)
if cover := compilePath(n, []string{"f"}).cover; cover != n {
t.Fatalf("cover through a choice = %v, want the choice itself", cover)
}
}
+1
View File
@@ -1069,6 +1069,7 @@ func TestProbeReportsTheTablesADrawPins(t *testing.T) {
} {
a := splitArm(c.path, nil)
head := f.root.children[a.head].(*table)
a.steps = compilePath(head, a.tail).steps
tr := tableReadOf(head, a, nil)
var sels []string
for _, s := range tr.sels {