Merge "Fix extra newline after multiline select case bodies" into main am: a3684d5d61
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3132292 Change-Id: Ibde81bfa91b5c1396bed0d55376736c2cbae7d9d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
27a62c91fd
2 changed files with 38 additions and 1 deletions
|
@ -227,7 +227,7 @@ func (p *printer) printSelect(s *Select) {
|
|||
} else {
|
||||
p.printExpression(c.Value)
|
||||
}
|
||||
p.printToken(",", c.Value.Pos())
|
||||
p.printToken(",", c.Value.End())
|
||||
}
|
||||
p.requestNewline()
|
||||
p.unindent(s.RBracePos)
|
||||
|
|
|
@ -696,6 +696,43 @@ foo {
|
|||
(default, default): "b",
|
||||
}),
|
||||
}
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "Select with multiline inner expression",
|
||||
input: `
|
||||
foo {
|
||||
cflags: [
|
||||
"-DPRODUCT_COMPATIBLE_PROPERTY",
|
||||
"-DRIL_SHLIB",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
] + select(soong_config_variable("sim", "sim_count"), {
|
||||
"2": [
|
||||
"-DANDROID_MULTI_SIM",
|
||||
"-DANDROID_SIM_COUNT_2",
|
||||
],
|
||||
default: [],
|
||||
}),
|
||||
}
|
||||
`,
|
||||
output: `
|
||||
foo {
|
||||
cflags: [
|
||||
"-DPRODUCT_COMPATIBLE_PROPERTY",
|
||||
"-DRIL_SHLIB",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-Wextra",
|
||||
] + select(soong_config_variable("sim", "sim_count"), {
|
||||
"2": [
|
||||
"-DANDROID_MULTI_SIM",
|
||||
"-DANDROID_SIM_COUNT_2",
|
||||
],
|
||||
default: [],
|
||||
}),
|
||||
}
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue