Fix newline escaping in line protocol (#3992)

(cherry picked from commit e4f8a82ee6)
This commit is contained in:
Daniel Nelson
2018-04-09 15:29:52 -07:00
committed by Daniel Nelson
parent 5f0fbc7d30
commit b5babc3f00
5 changed files with 5302 additions and 5084 deletions

View File

@@ -1154,6 +1154,22 @@ var tests = []struct {
},
},
},
{
name: "invalid newline in string field",
input: []byte("cpu value=\"4\n2\""),
results: []Result{
Result{
Name: Measurement,
Value: []byte("cpu"),
},
Result{
err: ErrFieldParse,
},
Result{
err: ErrFieldParse,
},
},
},
{
name: "invalid field value",
input: []byte(`cpu value=howdy`),