39 lines
1.1 KiB
Go
39 lines
1.1 KiB
Go
package main
|
|
|
|
import (
|
|
"path/filepath"
|
|
"strings"
|
|
"testing"
|
|
|
|
"checks/trunk"
|
|
)
|
|
|
|
// The script's run of this check over the real tree (novox/hq ADR 0529 clause 2): the list of modules not yet moved 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 TestTheUnmovedListHoldsNoModuleTheTrunksDoesNot(t *testing.T) {
|
|
found, err := Check(filepath.Join("..", ".."))
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
unmoved, err := Unmoved("unmoved")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
base := seed
|
|
if path, ok := trunk.Copy(t, "checks/config/unmoved"); ok {
|
|
if base, err = Unmoved(path); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
refused, stale, added := Judge(found, unmoved, base)
|
|
for _, m := range refused {
|
|
t.Errorf("%s says %s and is not on checks/config/unmoved", m, strings.Join(found[m], ", "))
|
|
}
|
|
for _, m := range stale {
|
|
t.Errorf("checks/config/unmoved names %s, which says no old name: take it out", m)
|
|
}
|
|
for _, m := range added {
|
|
t.Errorf("checks/config/unmoved gains %s, which the trunk's copy does not hold: the list only shrinks", m)
|
|
}
|
|
}
|