this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cmd/cue: test how `cue get go` generates invalid CUE attributes

This breaks the generated syntax momentarily to show the bug.

For #3436.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ie431eb6c4962f5113aaed09c15e7b1a12cd8af01
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1227727
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>

+11 -1
+11 -1
cmd/cue/cmd/testdata/script/get_go_types.txtar
··· 19 19 cmp go.mod go.mod.golden 20 20 21 21 # Check that the resulting CUE is valid 22 - exec cue vet -c=false ./... 22 + ! exec cue vet -c=false ./... 23 23 24 24 -- go.mod -- 25 25 module mod.test ··· 276 276 277 277 Err error 278 278 279 + // Field tag strings which need quoting as CUE attributes. 280 + Slashes any `xml:"https://foo.test/bar#fragment"` 281 + Parens any `xml:"closing)parens)"` 282 + InjectCUE any `xml:"), x: 4 @x("` 283 + 279 284 *Inline `json:",inline"` 280 285 } 281 286 ··· 540 545 S: string 541 546 "x-y": bool @go(XY) 542 547 Err: _ @go(,error) 548 + 549 + // Field tag strings which need quoting as CUE attributes. 550 + Slashes: _ @go(,any) @xml(https://foo.test/bar#fragment) 551 + Parens: _ @go(,any) @xml(closing)parens)) 552 + InjectCUE: _ @go(,any) @xml(), x: 4 @x() 543 553 544 554 #Inline 545 555 }