blob: 2ce8030b6cece0d7f3365ace9a19a8fc7588cbc6 [file] [log] [blame]
# Embedding at the file level should still close the package and validate
# correctly against files from other packages without first merging these
# files, thereby effectively embedding them and averting the closed check.
# Issue #743
! cue vet schema.cue foo.yaml
cmp stderr expect-foo
! cue vet schema.cue stream.yaml
cmp stderr expect-stream
-- schema.cue --
package schema
#Foo: {
a: int
b?: int
}
#Foo
-- foo.yaml --
a: 1
c: 2
-- stream.yaml --
a: 1
d: 2
---
a: 1
e: 2
-- expect-foo --
field `c` not allowed
-- expect-stream --
field `d` not allowed