-
Notifications
You must be signed in to change notification settings - Fork 453
Open
Description
Adding the following to buildozer/buildozer_test.sh:
function test_dict_set_with_select() {
in='cc_library(
name = "lib",
a_dictionary_attribute = {
"key1": "val1",
} | select({
"@platforms//cpu:arm64": {
"key2": "val2",
},
"//conditions:default": {},
}),
)'
run "$in" 'dict_set a_dictionary_attribute "key3":"val3"' //pkg:lib
assert_equals 'cc_library(
name = "lib",
a_dictionary_attribute = {
"key1": "val1",
"key3": "val3",
} | select({
"@platforms//cpu:arm64": {
"key2": "val2",
},
"//conditions:default": {},
}),
)'
}and running bazel test buildozer:buildozer_test --test_output=streamed shows
cc_library(
name = "lib",
- a_dictionary_attribute = {
- "key1": "val1",
- "key3": "val3",
- } | select({
- "@platforms//cpu:arm64": {
- "key2": "val2",
- },
- "//conditions:default": {},
- }),
+ a_dictionary_attribute = {"\"key3\"": "val3"},
)
Metadata
Metadata
Assignees
Labels
No labels