Skip to content

Commit

Permalink
Document difference between tab and newline in tests (#3383)
Browse files Browse the repository at this point in the history
Signed-off-by: George Robinson <george.robinson@grafana.com>
  • Loading branch information
grobinson-grafana authored Jun 7, 2023
1 parent 83304da commit 9f683fc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/labels/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9f683fc

Please sign in to comment.