# Tests that transitive package imports are correctly propagated. When foo imports
# bar which imports baz, evaluating foo should include values from all three
# packages rather than omitting the transitively imported baz contents.
# https://cuelang.org/issue/398
-- cue.mod/module.cue --
module: "mod.test"
language: version: "v0.9.0"
-- foo.cue --
package foo

import "mod.test/pkg:bar"

bar
zz: 3
@test(eq, {zz: 3, yy: 2, xx: 1})
-- pkg/bar.cue --
package bar

import "mod.test/pkg:baz"

baz
yy: 2
-- pkg/baz.cue --
package baz

xx: 1
-- out/eval/stats --
Leaks:  2
Freed:  4
Reused: 0
Allocs: 6
Retain: 0

Unifications: 4
Conjuncts:    8
Disjuncts:    0

NumCloseIDs: 4
-- out/todo.txt --
Reordering
