From 9f683fc4e7abe1094b220b251739a8baf1ef2926 Mon Sep 17 00:00:00 2001 From: George Robinson Date: Wed, 7 Jun 2023 18:32:48 +0100 Subject: [PATCH] Document difference between tab and newline in tests (#3383) Signed-off-by: George Robinson --- pkg/labels/parse_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/labels/parse_test.go b/pkg/labels/parse_test.go index b3a4c889..b4b1d631 100644 --- a/pkg/labels/parse_test.go +++ b/pkg/labels/parse_test.go @@ -282,6 +282,22 @@ func TestMatchers(t *testing.T) { return append(ms, m1, m2) }(), }, + { + input: `{foo=bar\t}`, + want: func() []*Matcher { + ms := []*Matcher{} + m, _ := NewMatcher(MatchEqual, "foo", "bar\\t") + return append(ms, m) + }(), + }, + { + input: `{foo=bar\n}`, + want: func() []*Matcher { + ms := []*Matcher{} + m, _ := NewMatcher(MatchEqual, "foo", "bar\n") + return append(ms, m) + }(), + }, { input: `job=`, want: func() []*Matcher {