Skip to content

Commit

Permalink
cue: add test for filling empty path
Browse files Browse the repository at this point in the history
Change-Id: Ib38fc0e08453931c80b41b11e1308ede58b38cdb
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9385
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
mpvl committed Apr 15, 2021
1 parent 50c137a commit c5c9125
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cue/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,14 @@ func TestFillPath(t *testing.T) {
out: `
{foo: {x: 1, bar: baz: 1}}
`,
}, {
// empty path
in: `
_
#foo: 1
`,
x: ast.NewIdent("#foo"),
out: `{1, #foo: 1}`,
}}

for _, tc := range testCases {
Expand Down

0 comments on commit c5c9125

Please sign in to comment.