adding test for escaped words
This commit is contained in:
parent
986074eb45
commit
4551bd0dc0
|
|
@ -39,11 +39,16 @@ func TestUpdateLabels(t *testing.T) {
|
||||||
Key: "bar",
|
Key: "bar",
|
||||||
Value: "baz",
|
Value: "baz",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Key: "multiword",
|
||||||
|
Value: "lots\\ of\\ words",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
expectedLabels := map[string]string{
|
expectedLabels := map[string]string{
|
||||||
"foo": "override",
|
"foo": "override",
|
||||||
"bar": "baz",
|
"bar": "baz",
|
||||||
|
"multiword": "lots of words",
|
||||||
}
|
}
|
||||||
updateLabels(labels, cfg)
|
updateLabels(labels, cfg)
|
||||||
testutil.CheckErrorAndDeepEqual(t, false, nil, expectedLabels, cfg.Labels)
|
testutil.CheckErrorAndDeepEqual(t, false, nil, expectedLabels, cfg.Labels)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue