bots-garden/mini-mepublic Fork
⑂ fix/plan-mode
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. 7087d46 · on fix/plan-mode · k33g · 9d ago
tools_reference_test.go · 26 lines · 645 BGo Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main

import (
	"os"
	"strings"
	"testing"

	"mm/internal/config"
)

// Every built-in tool has its own section in the tools reference, in both
// languages — `plan` went without one for months, documented only in a
// how-to.
func TestEveryBuiltinToolHasAReferenceSection(t *testing.T) {
	for _, page := range []string{"docs/en/reference/tools.md", "docs/fr/reference/tools.md"} {
		data, err := os.ReadFile(page)
		if err != nil {
			t.Fatal(err)
		}
		for _, name := range config.BuiltinToolNames {
			if !strings.Contains(string(data), "\n## `"+name+"`\n") {
				t.Errorf("%s has no \"## `%s`\" section", page, name)
			}
		}
	}
}