cue/format: add test cases for issue 2496
Both supplied by Tony Worm; the first indents too much,
and the second inserts a newline where there was none.
While here, I noticed this indenting bug appears with parentheses
and selectors as well, and I also noticed that we sometimes indent
top-level comments, which seems like a bug as well.
For #2496.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I978f8acf5469e255d026f737c9b39d7098fd30b3
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1196132
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Aram Hăvărneanu <aram@cue.works>