blob: f8c0995ac6362231c87fd6e46757a8ea2b3b1987 [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:
./foo.yaml:1:2
./foo.yaml:2:2
./schema.cue:1:1
./schema.cue:3:7
./schema.cue:7:1
-- expect-stream --
field d not allowed:
./schema.cue:1:1
./schema.cue:3:7
./schema.cue:7:1
./stream.yaml:1:2
./stream.yaml:2:2
-- expect-stream --
field d not allowed:
./schema.cue:1:1
./schema.cue:3:7
./schema.cue:7:1
./stream.yaml:1:2
./stream.yaml:2:2