adding test for escaped words

This commit is contained in:
sharifelgamal
2018-03-26 11:45:59 -07:00
parent 986074eb45
commit 4551bd0dc0
+7 -2
View File
@@ -39,11 +39,16 @@ func TestUpdateLabels(t *testing.T) {
Key: "bar",
Value: "baz",
},
{
Key: "multiword",
Value: "lots\\ of\\ words",
},
}
expectedLabels := map[string]string{
"foo": "override",
"bar": "baz",
"foo": "override",
"bar": "baz",
"multiword": "lots of words",
}
updateLabels(labels, cfg)
testutil.CheckErrorAndDeepEqual(t, false, nil, expectedLabels, cfg.Labels)