28 lines
768 B
Go
28 lines
768 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"checks/trunk"
|
|
)
|
|
|
|
// The script's run of this check over the real tree (novox/hq ADR 0529 clause 2): every rule holds, and the system-known list
|
|
// holds no line the trunk's copy at the merge base does not. A trunk with none had no list: its first copy.
|
|
func TestTheCatalogueKeepsEveryRuleOfOwnedPathsAndTheSystemListOnlyShrinks(t *testing.T) {
|
|
var base []string
|
|
if path, ok := trunk.Copy(t, "checks/owned/system-known"); ok {
|
|
lines, err := readLines(path)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
base = append([]string{}, lines...)
|
|
}
|
|
found, err := Check("../..", base)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
for _, f := range found {
|
|
t.Errorf("%s: %s: %s (rule %d, novox/hq ADR 0422 §8)", f.Module, f.ID, f.Why, f.Rule)
|
|
}
|
|
}
|