this repo has no description
0
fork

Configure Feed

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

internal/cuetxtar: fix @test(debugOutput) multiline string format

CUE multiline strings require a newline immediately after the opening
""". The generated @test(debugOutput, """...""") was missing this,
causing parse errors when the file was later loaded as CUE source.

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ib3e3fdd3d94126e679b77f7b98cddeff91a68c6d
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1234944
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

+1 -1
+1 -1
internal/cuetxtar/inline.go
··· 1310 1310 // Always auto-update on mismatch (informational, not an assertion). 1311 1311 if cuetest.ForceUpdateGoldenFiles || cuetest.UpdateGoldenFiles { 1312 1312 escaped := strings.ReplaceAll(actual, `"`, `\"`) 1313 - r.enqueueInlineFill(pa, fmt.Sprintf(`@test(debugOutput, """%s""")`, escaped)) 1313 + r.enqueueInlineFill(pa, fmt.Sprintf("@test(debugOutput, \"\"\"\n%s\"\"\")", escaped)) 1314 1314 return 1315 1315 } 1316 1316 if !match {