Skip to content

Commit 587d5a1

Browse files
committed
cmd/cue/cmd: add test for edge case
This was exposed during the work done on reducing the depth of the closeContext graph. Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: Ia3ee2d2aa2ec1142704def120c3efe354c55c7e2 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1209213 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Matthew Sackman <[email protected]>
1 parent b17ea50 commit 587d5a1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# With the old evaluator.
2+
env CUE_EXPERIMENT=evalv3=0
3+
exec cue vet -c schema.cue data.json
4+
5+
# With the new evaluator.
6+
env CUE_EXPERIMENT=evalv3=1
7+
env CUE_DEBUG=openinline=0
8+
! exec cue vet -c schema.cue data.json #TODO Fix
9+
10+
-- data.json --
11+
{
12+
"step": {
13+
"run": "echo foo"
14+
}
15+
}
16+
-- schema.cue --
17+
package githubactions
18+
19+
#Workflow
20+
21+
#Workflow: {
22+
step!: matchN(1, [{
23+
"uses"!: _
24+
...
25+
}, {
26+
"run"!: _
27+
...
28+
}]) & close({
29+
"uses"?: string
30+
"run"?: string
31+
})
32+
}

0 commit comments

Comments
 (0)