rcl/golden/fmt/seq_split_suffix.test
Ruud van Asseldonk d5682afab7 Add tests for handling of split suffixes
This was the one regression in test coverage for the parser. While
adding this test, I realized we need to also make sure to not create
consecutive whitespace, as it would create a non-idempotency in the
formatter. The fuzzer has not discovered that yet, though I suspect it
would after a while.
2025-08-23 20:53:27 +02:00

52 lines
656 B
Text

let a = [
42
// This is a comment before the trailing comma, that is going to be moved after it.
,
];
let b = [
42
// This one will merge
,
// With the one below it.
];
let c = [
// Blanks before the comma get dropped.
42
,
];
let d = [
// But blanks before the closing bracket do not.
42
];
null
# output:
let a = [
42,
// This is a comment before the trailing comma, that is going to be moved after it.
];
let b = [
42,
// This one will merge
// With the one below it.
];
let c = [
// Blanks before the comma get dropped.
42,
];
let d = [
// But blanks before the closing bracket do not.
42,
];
null