Skip to content

Commit

Permalink
internal/core/eval: verify issue 398 is fixed
Browse files Browse the repository at this point in the history
Fixes #398

Change-Id: Id7d8d4590f6bb531cb58ea4a176d33237c123fb2
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7044
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
  • Loading branch information
mpvl committed Sep 12, 2020
1 parent df9468e commit fbf9de3
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cmd/cue/cmd/testdata/script/issue398.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cue eval ./pkg:foo
cmp stdout expect-stdout
-- cue.mod/module.cue --
module: "example.com"
-- pkg/foo.cue --
package foo
import "example.com/pkg:bar"
bar
z: 3
-- pkg/bar.cue --
package bar
import "example.com/pkg:baz"
baz
y: 2
-- pkg/baz.cue --
package baz
x: 1
-- expect-stdout --
z: 3
y: 2
x: 1
31 changes: 31 additions & 0 deletions cue/testdata/packages/issue398.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-- cue.mod/module.cue --
module: "example.com"
-- foo.cue --
package foo
import "example.com/pkg:bar"
bar
zz: 3
-- pkg/bar.cue --
package bar
import "example.com/pkg:baz"
baz
yy: 2
-- pkg/baz.cue --
package baz
xx: 1
-- out/eval --
(struct){
foo: (struct){
x: (int){ 1 }
y: (int){ 2 }
}
zz: (int){ 3 }
x: (int){ 1 }
y: (int){ 2 }
}
-- out/compile --
--- foo.cue
{
〈import;"example.com/pkg:bar"〉
zz: 3
}

0 comments on commit fbf9de3

Please sign in to comment.