Skip to content

Commit

Permalink
cue/format: add a regression test for issue 1544
Browse files Browse the repository at this point in the history
This shows the current buggy behavior, where comprehensions at the start
of a file gain a blank space.

For #1544.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I9751f0eae5408c2c9e11b95e83107441e3209cc4
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1196107
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
  • Loading branch information
mvdan committed Jun 10, 2024
1 parent 08b1ce0 commit 475f692
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cue/format/testdata/issue1544.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- if.input --
if true {
x: 5
}
-- if.golden --
if true {
x: 5
}
-- let.input --
let x = 5
y: x
-- let.golden --
let x = 5
y: x
-- for.input --
for v in ["a", "b"] {
(v): v
}
-- for.golden --
for v in ["a", "b"] {
(v): v
}

0 comments on commit 475f692

Please sign in to comment.