This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/flow/testdata: add test with package dependency
Change-Id: Ic7451aad0641aaf417e1052477fd8d1ef373f089 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9302 Reviewed-by: CUE cueckoo <cueckoo@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
- Loading branch information
Showing
1 changed file
with
85 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,85 @@ | ||
-- cue.mod/module.cue -- | ||
module: "example.org/test" | ||
-- sub/sub.cue -- | ||
package sub | ||
|
||
User: "sub" | ||
-- in.cue -- | ||
import "example.org/test/sub" | ||
|
||
root: { | ||
a: { | ||
$id: "valToOut" | ||
val: "foo \(sub.User)" | ||
out: string | ||
} | ||
b: { | ||
$id: "valToOut" | ||
$after: a | ||
val: "bar" | ||
out: string | ||
} | ||
c: { | ||
$id: "valToOut" | ||
out: a.out + b.out | ||
} | ||
} | ||
-- out/run/errors -- | ||
-- out/run/t0 -- | ||
graph TD | ||
t0("root.a [Ready]") | ||
t1("root.b [Waiting]") | ||
t1-->t0 | ||
t2("root.c [Waiting]") | ||
t2-->t0 | ||
t2-->t1 | ||
|
||
-- out/run/t1 -- | ||
graph TD | ||
t0("root.a [Terminated]") | ||
t1("root.b [Ready]") | ||
t1-->t0 | ||
t2("root.c [Waiting]") | ||
t2-->t0 | ||
t2-->t1 | ||
|
||
-- out/run/t1/value -- | ||
{ | ||
$id: "valToOut" | ||
val: "foo sub" | ||
out: "foo sub" | ||
} | ||
-- out/run/t2 -- | ||
graph TD | ||
t0("root.a [Terminated]") | ||
t1("root.b [Terminated]") | ||
t1-->t0 | ||
t2("root.c [Ready]") | ||
t2-->t0 | ||
t2-->t1 | ||
|
||
-- out/run/t2/value -- | ||
{ | ||
$id: "valToOut" | ||
$after: { | ||
$id: "valToOut" | ||
val: "foo sub" | ||
out: "foo sub" | ||
} | ||
val: "bar" | ||
out: "bar" | ||
} | ||
-- out/run/t3 -- | ||
graph TD | ||
t0("root.a [Terminated]") | ||
t1("root.b [Terminated]") | ||
t1-->t0 | ||
t2("root.c [Terminated]") | ||
t2-->t0 | ||
t2-->t1 | ||
|
||
-- out/run/t3/value -- | ||
{ | ||
$id: "valToOut" | ||
out: "foo subbar" | ||
} |