adding test for escaped words

This commit is contained in:
sharifelgamal 2018-03-26 11:45:59 -07:00
parent 986074eb45
commit 4551bd0dc0
No known key found for this signature in database
GPG Key ID: 63E3F6ED6963163C
1 changed files with 7 additions and 2 deletions

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)