# Tests that an @test(eq, {...}) body containing both an embedded `_|_` and a
# top-level `@test(err, ...)` attribute is treated as a struct-level error
# assertion: the embedded `_|_` requires the actual value to carry an error,
# the @test(err, ...) attribute checks the error's code/contains/pos against
# that error, and any other declarations in the expected struct are
# informational (lenient mode — they may diverge across orderings without
# changing the meaning of the test).
-- in/test.cue --
y: {
	a: 1
	b: 1 & 2
} @test(eq, {
	_|_
	@test(err, code=eval, contains="conflicting values 2 and 1")
	informationalField: 999
	another: "anything"
})
-- out/status.txt --
update: output passes run
force:  identical to update
-- out/update/out/errors.txt --
[eval] y.b: conflicting values 2 and 1:
    ./test.cue:3:5
    ./test.cue:3:9
-- out/update/test.cue --
y: {
	a: 1
	b: 1 & 2
} @test(eq, {
	_|_
	@test(err, code=eval, contains="conflicting values 2 and 1")
	informationalField: 999
	another: "anything"
})
