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 5 additions and 2 deletions
Showing only changes of commit 350514b60e - Show all commits
+3
View File
@@ -75,6 +75,9 @@ func TestCalcFields(t *testing.T) {
if got := mustRender(t, engine(1), `{"format":"{calc(a - b)}","a":{"format":"{n}","n":"10"},"b":"3"}`); got != "7" {
t.Fatalf("calc(a - b) = %q, want 7", got)
}
if got := mustRender(t, engine(1), `{"format":"{calc(b * (a - b))}","a":"10","b":"3"}`); got != "21" {
t.Fatalf("calc(b * (a - b)) = %q, want 21", got)
}
}
// TestCalcNonNumericIsNaN pins the never-fail rule: a field that sometimes does
+2 -2
View File
@@ -14,8 +14,8 @@ func TestSplitArgsQuotesOutsideSelectors(t *testing.T) {
"/geo.US.locality[O'Fallon].name, 2": {"/geo.US.locality[O'Fallon].name", "2"},
"'[a,b]'": {"'[a,b]'"},
} {
if got := SplitArgs(in); !reflect.DeepEqual(got, want) {
t.Errorf("SplitArgs(%q) = %q, want %q", in, got, want)
if got := splitArgs(in); !reflect.DeepEqual(got, want) {
t.Errorf("splitArgs(%q) = %q, want %q", in, got, want)
}
}
}