Skip to content

Commit c5c9125

Browse files
committed
cue: add test for filling empty path
Change-Id: Ib38fc0e08453931c80b41b11e1308ede58b38cdb Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9385 Reviewed-by: CUE cueckoo <[email protected]> Reviewed-by: Paul Jolly <[email protected]>
1 parent 50c137a commit c5c9125

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cue/types_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,14 @@ func TestFillPath(t *testing.T) {
11291129
out: `
11301130
{foo: {x: 1, bar: baz: 1}}
11311131
`,
1132+
}, {
1133+
// empty path
1134+
in: `
1135+
_
1136+
#foo: 1
1137+
`,
1138+
x: ast.NewIdent("#foo"),
1139+
out: `{1, #foo: 1}`,
11321140
}}
11331141

11341142
for _, tc := range testCases {

0 commit comments

Comments
 (0)