blob: 4870761b37a9801ba93a5310044d3be7fd8bca8a [file] [log] [blame]
cue cmd dump
cmp stdout expect-stdout
-- f1.cue --
package kube
pkg: {
#Def: {
a: int
b: #Role
}
#Role: {
kind: string
name: string
}
}
test: pkg.#Def
test: {
a: 1
b: {
kind: "foo"
name: "bar"
}
}
// A kind at the top-level should not be allowed.
kind: "foo"
$id: "bar"
-- dump_tool.cue --
package kube
import (
"tool/cli"
"encoding/yaml"
)
command: dump: {
task: print: cli.Print & { text: yaml.Marshal(test) }
}
-- expect-stdout --
a: 1
b:
kind: foo
name: bar