influxdb/logfmt/tests
Marko Mikulicic 961c981d31
fix: Fix logfmt escaping
Closes #1252

I defer to #1252 for the wider context; the "why" this escaping rule is the likely the right one (the "official" logfmt is particularly light on the spec side)

This PR, implements the following interpretation of the escaping rules:

1. To put a double quote in a double quoted string, you need to escape the double quote with a backslash: `"` -> `"\""`.
2. To put a backslash in a double quoted string, you need to escape the backslash with another backslash: `\` -> `"\\"`.
3. To put a character sequence `\"` inside a double quoted string, you need to combine the previous two rules: `\"` -> `"\\\""`

These rules are quite reasonable and follow the escape rules of most languages.

The test strings are correctly parsed by https://github.com/brandur/hutils,
2021-06-04 02:10:24 +02:00
..
logging.rs fix: Fix logfmt escaping 2021-06-04 02:10:24 +02:00