Allow CR and FF inside of string fields and fix parser panic (#7427)

This commit is contained in:
Daniel Nelson
2020-04-28 14:42:37 -07:00
committed by GitHub
parent 476a899a1a
commit cf3d48bb68
5 changed files with 16653 additions and 16901 deletions

View File

@@ -873,6 +873,27 @@ var tests = []struct {
},
},
},
{
name: "cr in string field",
input: []byte("cpu value=\"4\r2\""),
results: []Result{
{
Name: Measurement,
Value: []byte("cpu"),
},
{
Name: FieldKey,
Value: []byte("value"),
},
{
Name: FieldString,
Value: []byte("4\r2"),
},
{
Name: Success,
},
},
},
{
name: "bool field",
input: []byte("cpu value=true"),