# TODO: line numbers for errors.

#Issue 1153
#Issue 1152

# Default export mode
! exec cue export x.cue
cmp stderr out/stderr

# JSON
! exec cue export --out json x.cue
cmp stderr out/stderr

# Yaml
! exec cue export --out yaml x.cue
cmp stderr out/stderr

# CUE data
! exec cue export --out cue x.cue
cmp stderr out/stderr

# Concrete
! exec cue eval -c x.cue
cmp stderr out/stderr

# CUE
exec cue eval --out cue x.cue
cmp stdout expect-cue

-- x.cue --
package foo

#SomeBaseType: {
	"a" | "b"
	#AUTO: "z"
}

V1: ("x" | "y") | *"z"
V2: ("x" | "y") | *#SomeBaseType.#AUTO

-- expect-cue --
#SomeBaseType: {
    "a"
    #AUTO: "z"
} | {
    "b"
    #AUTO: "z"
}
V1: "z"
V2: "x" | "y"
-- out/stderr --
V2: incomplete value "x" | "y"
