Files
mesh-catalog/checks/templates/realtree_test.go
T

37 lines
1.0 KiB
Go

package main
import (
"testing"
"checks/trunk"
)
// The script's run of this check over the real tree (novox/hq ADR 0529 clause 2): the list of modules keeping file text inline
// gains none the trunk's copy at the merge base does not hold. Without a trunk copy the modules in seed are the trunk's.
func TestTheInlineListHoldsNoModuleTheTrunksDoesNot(t *testing.T) {
found, err := Check("../..")
if err != nil {
t.Fatal(err)
}
listed, err := Listed(listFile)
if err != nil {
t.Fatal(err)
}
base := seed
if path, ok := trunk.Copy(t, "checks/templates/inline"); ok {
if base, err = Listed(path); err != nil {
t.Fatal(err)
}
}
refused, stale, added := Judge(found, listed, base)
for _, m := range refused {
t.Error(Refusal(m, found[m], TemplatesDir("../..", m)))
}
for _, m := range stale {
t.Errorf("checks/templates/inline names %s, which keeps no file text inline: take it out", m)
}
for _, m := range added {
t.Errorf("checks/templates/inline gains %s, which the trunk's copy does not hold: the list only shrinks", m)
}
}