-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/core/eval: verify issue 398 is fixed
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
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |