bpfmt: Test comment line while sorting arrays am: a74d05b939 am: 26801b1c03 am: 438d864e2f am: d46299e855

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2593367

Change-Id: Ib5b6667cd8e2570c3007c8cdc1519a81159bd890
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
William Escande 2023-05-18 06:15:06 +00:00 committed by Automerger Merge Worker
commit 82cb863d8e

View file

@ -447,6 +447,116 @@ stuff {
},
],
}
`,
},
{
input: `
// test
foo {
stuff: [
"a", // great comment
"b",
],
}
`,
output: `
// test
foo {
stuff: [
"a", // great comment
"b",
],
}
`,
},
{
input: `
// test
foo {
stuff: [
"a",
// b comment
"b",
],
}
`,
output: `
// test
foo {
stuff: [
"a",
// b comment
"b",
],
}
`,
},
{
input: `
// test
foo {
stuff: [
"a", // a comment
// b comment
"b",
],
}
`,
output: `
// test
foo {
stuff: [
"a", // a comment
// b comment
"b",
],
}
`,
},
{
input: `
// test
foo {
stuff: [
"a",
// b comment
// on multiline
"b",
],
}
`,
output: `
// test
foo {
stuff: [
"a",
// b comment
// on multiline
"b",
],
}
`,
},
{ // Line comment are treat as groups separator
input: `
// test
foo {
stuff: [
"b",
// a comment
"a",
],
}
`,
output: `
// test
foo {
stuff: [
"b",
// a comment
"a",
],
}
`,
},
}