Fix newline escaping in line protocol (#3992)

This commit is contained in:
Daniel Nelson
2018-04-09 15:29:52 -07:00
committed by GitHub
parent d9230ac92d
commit cad0cf4c78
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`),