exec cue-v0.16.1 fmt --diff in.cue
exec cue-v0.17.0-alpha.3 fmt --diff in.cue
exec cue-master fmt --diff in.cue
-- in.cue --
idx: bar[
"baz"
]
> exec cue-v0.16.1 fmt --diff in.cue
[stderr]
expected ']', found newline:
./in.cue:2:7
missing ',' in struct literal:
./in.cue:3:1
[exit status 1]
FAIL: repro.txtar:1: unexpected command failure
> exec cue-v0.17.0-alpha.3 fmt --diff in.cue
[stdout]
diff in.cue.orig in.cue
--- in.cue.orig
+++ in.cue
@@ -1,3 +1,3 @@
idx: bar[
- "baz"
-]
+ "baz"
+ ]
> exec cue-master fmt --diff in.cue
[stdout]
diff in.cue.orig in.cue
--- in.cue.orig
+++ in.cue
@@ -1,3 +1,2 @@
idx: bar[
- "baz"
-]
+ "baz"]
Support for a comma was added in v0.17, so ignore the fact that v0.16.0 fails.
Also ignore the fact that v0.17 leads to bad indentation. That's just the old formatter being buggy.
Regardless, formatv2 should be a no-op here; it shouldn't force ] to be collapsed when it's on a new line and well balanced with [ being at the end of a line.
Support for a comma was added in v0.17, so ignore the fact that v0.16.0 fails.
Also ignore the fact that v0.17 leads to bad indentation. That's just the old formatter being buggy.
Regardless, formatv2 should be a no-op here; it shouldn't force
]to be collapsed when it's on a new line and well balanced with[being at the end of a line.