# Root package cannot work
! exec cue export mod.example
stderr 'unknown file extension \.example'

# Explicitly select root package to resolve ambiguity
exec cue export mod.example:x
cmp stdout root.golden

# p implicitly selected
exec cue export mod.example/p
cmp stdout p.golden

# p explicitly selected
exec cue export mod.example/p:p
cmp stdout p.golden

# with fully qualified import path
exec cue export mod.example/p@v0:p
cmp stdout p.golden

# as relative path
exec cue export ./p
cmp stdout p.golden

-- cue.mod/module.cue --
module: "mod.example@v0"
language: version: "v0.8.0"
-- x.cue --
package x

x: 5
-- p/p.cue --
package p

p: 4
-- root.golden --
{
    "x": 5
}
-- p.golden --
{
    "p": 4
}
