Merge "bp2build/queryview: codegen control sequences literally."

This commit is contained in:
Jingwen Chen
2021-03-30 21:57:09 +00:00
committed by Gerrit Code Review
2 changed files with 23 additions and 0 deletions

View File

@@ -239,6 +239,22 @@ func TestGenerateBazelTargetModules(t *testing.T) {
"b",
],
string_prop = "a",
)`,
},
{
bp: `custom {
name: "control_characters",
string_list_prop: ["\t", "\n"],
string_prop: "a\t\n\r",
bazel_module: { bp2build_available: true },
}`,
expectedBazelTarget: `custom(
name = "control_characters",
string_list_prop = [
"\t",
"\n",
],
string_prop = "a\t\n\r",
)`,
},
}