From 50f5ba5b0cfdf02cd87a9070676bd3c21c217296 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 16 Oct 2014 10:48:33 +0200 Subject: [PATCH] ethlog: add test for '%' in log message This test fails because the log message is formatted twice. --- ethlog/loggers_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethlog/loggers_test.go b/ethlog/loggers_test.go index 0466a3d59..23f649312 100644 --- a/ethlog/loggers_test.go +++ b/ethlog/loggers_test.go @@ -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) {