Document difference between tab and newline in tests#3383
Conversation
|
At least, from the PromQL documentation, I would expect |
Signed-off-by: George Robinson <george.robinson@grafana.com>
dd51bef to
f8de618
Compare
|
Tagging @beorn7 and @simonpasquier to see if they have any reckons. In the meantime, I'll merge this as tests that document existing behaviour are always a great thing to have. |
|
This is probably inspired by the behavior in the exposition format, in particular: “… the backslash (), double-quote ("), and line feed (\n) characters have to be escaped as \, ", and \n, respectively” (i.e. this is not using the usual Go string escaping, but a very specific limited one). This is certainly a mixup as the matchers are supposed to be inspired by PromQL, not by the exposition format. So your expectation is spot-on, the matchers should follow escaping rules of PromQL wherever reasonably possible. |
Signed-off-by: George Robinson <george.robinson@grafana.com>
Signed-off-by: George Robinson <george.robinson@grafana.com>
Signed-off-by: George Robinson <george.robinson@grafana.com>
I found a possible bug (unexpected behaviour?) in the current parser for label matchers where
\nis interpolated and\tis not. I've chosen to document this with a test while I figure out if this is intentional or not.Related: #3353