Complete resolution provenance readiness audit
This commit is contained in:
@@ -322,7 +322,7 @@ func TestResolutionInputUsesEntryShapesAcrossTypedAndDynamicValues(t *testing.T)
|
||||
Dynamic any `yaml:"dynamic"`
|
||||
}
|
||||
var callbackErr error
|
||||
_, err := Load[config](Bytes("shapes.yml", []byte("name: inlined\nmappings: {'-0': key}\narray: [zero, one]\ndynamic: {nested: [dynamic]}\n")), Options[config]{Definition: Definition[config]{Resolve: func(_ *config, resolution *Resolution) error {
|
||||
_, err := Load[config](Bytes("shapes.yml", []byte("name: inlined\nmappings: {'-0': key, 'a/b~': escaped}\narray: [zero, one]\ndynamic: {nested: [dynamic]}\n")), Options[config]{Definition: Definition[config]{Resolve: func(_ *config, resolution *Resolution) error {
|
||||
check := func(path Path, want bool) {
|
||||
_, found := resolution.InputInfo(path)
|
||||
if found != want && callbackErr == nil {
|
||||
@@ -330,8 +330,10 @@ func TestResolutionInputUsesEntryShapesAcrossTypedAndDynamicValues(t *testing.T)
|
||||
}
|
||||
}
|
||||
parsedMapping, _ := ParsePath("/mappings/-0")
|
||||
escapedMapping, _ := ParsePath("/mappings/a~1b~0")
|
||||
check(Keys("name"), true)
|
||||
check(parsedMapping, true)
|
||||
check(escapedMapping, true)
|
||||
check(Keys("mappings").Index(0), false)
|
||||
check(Keys("array").Index(1), true)
|
||||
check(Keys("array", "1"), false)
|
||||
|
||||
Reference in New Issue
Block a user