Add example for configuration without trailing newline.

Inspired by #102, illustrate and ensure that trailing newlines are not
necessary.
This commit is contained in:
Matthias Rampke 2017-11-10 20:01:15 +00:00
parent d4d0b4a6a7
commit e24888356f

View file

@ -189,6 +189,20 @@ mappings:
config: ``,
mappings: map[string]map[string]string{},
},
// Config without a trailing newline.
{
config: `mappings:
- match: test.*
labels:
name: "name"
label: "${1}_foo"`,
mappings: map[string]map[string]string{
"test.a": map[string]string{
"name": "name",
"label": "a_foo",
},
},
},
// Config with good timer type.
{
config: `---