Files
mesh-controller/cmd/mesh-controller/usage_test.go
T
jschoubben d51324df45
mesh/repo-check head d51324df4518 merged into trunk f2a4363a1a77 beside mesh-catalog#457@896bd883 — pass: its merge-check.sh passed
mesh/merge-gate head d51324df4518 merged into trunk f2a4363a1a77 — pass: group feat/r4e composed: every machine composes with the change as it did without …
mesh/delivery covered after its stop: a later walk that contains it was delivered: plan-1792707174627079192 (novox/mesh-controller at 289bbf68 into main,…
mesh/delivery-group group feat/r4e delivered: every member is delivered
mesh/check failed: unit: ..test: node:internal/modules/esm/resolve:989 | d51324df4518 on f2a4363a1a77 | unit 1 run, 0 kept | integration 0 run, 0 kept…
Format the help's test (issue 1851)
2026-10-22 21:20:06 +02:00

26 lines
905 B
Go

package main
import (
"regexp"
"strings"
"testing"
)
// C3 (issue 1851 A11a, A11b, A13; ADR 0501 §4, §5): the terminal's help lists no command it refuses as removed, and lists
// the ones R4e added: `register` and `switch`.
func TestTheHelpListsNoRemovedCommandAndTheNewOnes(t *testing.T) {
for _, removed := range []string{"build", "rebuild", "forget-checks", "delivery plan"} {
if regexp.MustCompile(`(?m)^ ` + regexp.QuoteMeta(removed) + ` `).MatchString(usageText) {
t.Errorf("the help still lists %q, which is refused as removed", removed)
}
}
if strings.Contains(usageText, "--register") {
t.Error("the help still lists replay --register, which is refused as removed")
}
for _, added := range []string{"register <module> <owner>/<repository> <path>", "switch [--json]"} {
if !strings.Contains(usageText, " "+added) {
t.Errorf("the help does not list %q", added)
}
}
}