Expect the syslog keyword misc.loglevel renders, beside the RFC severity
This commit is contained in:
+2
-1
@@ -119,8 +119,9 @@ func TestShippedMiscReferenceData(t *testing.T) {
|
|||||||
"protocol": regexp.MustCompile(`^\S+( \S+)*$`),
|
"protocol": regexp.MustCompile(`^\S+( \S+)*$`),
|
||||||
"protocol.name": regexp.MustCompile(`\S`),
|
"protocol.name": regexp.MustCompile(`\S`),
|
||||||
"protocol.number": regexp.MustCompile(`^\d{1,3}$`),
|
"protocol.number": regexp.MustCompile(`^\d{1,3}$`),
|
||||||
"loglevel": regexp.MustCompile(`^(Alert|Critical|Debug|Emergency|Error|Informational|Notice|Warning)$`),
|
"loglevel": regexp.MustCompile(`^(alert|crit|debug|emerg|err|info|notice|warning)$`),
|
||||||
"loglevel.code": regexp.MustCompile(`^[0-7]$`),
|
"loglevel.code": regexp.MustCompile(`^[0-7]$`),
|
||||||
|
"loglevel.severity": regexp.MustCompile(`^(Alert|Critical|Debug|Emergency|Error|Informational|Notice|Warning)$`),
|
||||||
"tld": regexp.MustCompile(`^\.[a-z0-9]([a-z0-9-]*[a-z0-9])?$`),
|
"tld": regexp.MustCompile(`^\.[a-z0-9]([a-z0-9-]*[a-z0-9])?$`),
|
||||||
"tld.type": regexp.MustCompile(`^(country-code|generic|generic-restricted|infrastructure|sponsored)$`),
|
"tld.type": regexp.MustCompile(`^(country-code|generic|generic-restricted|infrastructure|sponsored)$`),
|
||||||
"tld.unicode": regexp.MustCompile(`^\.\S+$`),
|
"tld.unicode": regexp.MustCompile(`^\.\S+$`),
|
||||||
|
|||||||
+10
-9
@@ -725,15 +725,16 @@ func TestShippedTables(t *testing.T) {
|
|||||||
"tld[.рф]": ".xn--p1ai",
|
"tld[.рф]": ".xn--p1ai",
|
||||||
"tld[.xn--p1ai].unicode": ".рф",
|
"tld[.xn--p1ai].unicode": ".рф",
|
||||||
"territory[NP].timezone.offset": "+05:45",
|
"territory[NP].timezone.offset": "+05:45",
|
||||||
"loglevel[0]": "Emergency",
|
"loglevel[0]": "emerg",
|
||||||
"loglevel[1]": "Alert",
|
"loglevel[1]": "alert",
|
||||||
"loglevel[2]": "Critical",
|
"loglevel[2]": "crit",
|
||||||
"loglevel[3]": "Error",
|
"loglevel[3]": "err",
|
||||||
"loglevel[4]": "Warning",
|
"loglevel[4]": "warning",
|
||||||
"loglevel[5]": "Notice",
|
"loglevel[5]": "notice",
|
||||||
"loglevel[6]": "Informational",
|
"loglevel[6]": "info",
|
||||||
"loglevel[7]": "Debug",
|
"loglevel[7]": "debug",
|
||||||
"loglevel[Error].code": "3",
|
"loglevel[err].code": "3",
|
||||||
|
"loglevel[6].severity": "Informational",
|
||||||
} {
|
} {
|
||||||
if got := fake(t, f, path); got != want {
|
if got := fake(t, f, path); got != want {
|
||||||
t.Errorf("Fake(%q) = %q, want %q", path, got, want)
|
t.Errorf("Fake(%q) = %q, want %q", path, got, want)
|
||||||
|
|||||||
Reference in New Issue
Block a user