mirror of https://github.com/sirupsen/logrus.git
Fix test to adjust for missing quotes
This commit is contained in:
parent
15b296befc
commit
e5c1364122
|
@ -44,8 +44,12 @@ func LogAndAssertText(t *testing.T, log func(*Logger), assertions func(fields ma
|
||||||
}
|
}
|
||||||
kvArr := strings.Split(kv, "=")
|
kvArr := strings.Split(kv, "=")
|
||||||
key := strings.TrimSpace(kvArr[0])
|
key := strings.TrimSpace(kvArr[0])
|
||||||
val, err := strconv.Unquote(kvArr[1])
|
val := kvArr[1]
|
||||||
assert.NoError(t, err)
|
if kvArr[1][0] == '"' {
|
||||||
|
var err error
|
||||||
|
val, err = strconv.Unquote(val)
|
||||||
|
assert.NoError(t, err)
|
||||||
|
}
|
||||||
fields[key] = val
|
fields[key] = val
|
||||||
}
|
}
|
||||||
assertions(fields)
|
assertions(fields)
|
||||||
|
|
Loading…
Reference in New Issue