Skip to content

Commit 9f683fc

Browse files
Document difference between tab and newline in tests (#3383)
Signed-off-by: George Robinson <[email protected]>
1 parent 83304da commit 9f683fc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pkg/labels/parse_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,22 @@ func TestMatchers(t *testing.T) {
282282
return append(ms, m1, m2)
283283
}(),
284284
},
285+
{
286+
input: `{foo=bar\t}`,
287+
want: func() []*Matcher {
288+
ms := []*Matcher{}
289+
m, _ := NewMatcher(MatchEqual, "foo", "bar\\t")
290+
return append(ms, m)
291+
}(),
292+
},
293+
{
294+
input: `{foo=bar\n}`,
295+
want: func() []*Matcher {
296+
ms := []*Matcher{}
297+
m, _ := NewMatcher(MatchEqual, "foo", "bar\n")
298+
return append(ms, m)
299+
}(),
300+
},
285301
{
286302
input: `job=`,
287303
want: func() []*Matcher {

0 commit comments

Comments
 (0)