Issue 1585, S19: the strict parser, every manifest problem function and the judge's tables (192 declarations, about 5,200 lines) and their 244 tests leave; composition keeps its own refusals and the helpers it uses. The catalogue's tests decode the manifests they build. ParseManifest, ParseManifestWith, ParseManifestForInputs, CatalogueProblems and the rest are gone; mesh-delivery-indexer/judge holds them. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
21 lines
616 B
Go
21 lines
616 B
Go
package catalogue
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestParseManifestForInputsStillRefusesWhatTheParserRefuses(t *testing.T) { // issue 1751
|
|
was := ReplacePublished(nil)
|
|
defer ReplacePublished(was)
|
|
raw, _ := os.ReadFile("testdata/catalogue-835bf22b-xterm.module.json")
|
|
bad := strings.Replace(string(raw), `"predefined": "font-size"`, `"predefined": "font-size", "trusted": "yes"`, 1)
|
|
if bad == string(raw) {
|
|
t.Fatal("the fixture no longer names font-size; the test proves nothing")
|
|
}
|
|
if _, err := decodeForTest([]byte(bad)); err == nil {
|
|
t.Error("a manifest the parser refuses was read")
|
|
}
|
|
}
|