Allow CR and FF inside of string fields and fix parser panic (#7427)
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user