mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-05 19:05:03 +00:00
ethlog: add test for '%' in log message
This test fails because the log message is formatted twice.
This commit is contained in:
parent
cbd785cfe8
commit
50f5ba5b0c
1 changed files with 2 additions and 2 deletions
|
|
@ -107,11 +107,11 @@ func TestLoggerPrintf(t *testing.T) {
|
|||
testLogSystem := &TestLogSystem{level: WarnLevel}
|
||||
AddLogSystem(testLogSystem)
|
||||
logger.Errorf("error to %v\n", []int{1, 2, 3})
|
||||
logger.Warnf("warn")
|
||||
logger.Warnf("warn %%d %d", 5)
|
||||
logger.Infof("info")
|
||||
logger.Debugf("debug")
|
||||
Flush()
|
||||
testLogSystem.CheckOutput(t, "[TEST] error to [1 2 3]\n[TEST] warn")
|
||||
testLogSystem.CheckOutput(t, "[TEST] error to [1 2 3]\n[TEST] warn %d 5")
|
||||
}
|
||||
|
||||
func TestMultipleLogSystems(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue