diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index a65a72313f..618806f3cd 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -779,6 +779,17 @@ void tst_qmessagehandler::qMessagePattern_data() << true << (QList<QByteArray>() << ('/' + QDateTime::currentDateTime().toString("yyyy - MM - d").toUtf8() + "/qDebug")); + QTest::newRow("time-time") << "/%{time yyyy - MM - d}/%{time dd-MM-yy}/%{message}" + << true << (QList<QByteArray>() + << ('/' + QDateTime::currentDateTime().toString("yyyy - MM - d").toUtf8() + + '/' + QDateTime::currentDateTime().toString("dd-MM-yy").toUtf8() + + "/qDebug")); + + QTest::newRow("skipped-time-shown-time") + << "/%{if-warning}%{time yyyy - MM - d}%{endif}%{if-debug}%{time dd-MM-yy}%{endif}/%{message}" + << true << (QList<QByteArray>() + << ('/' + QDateTime::currentDateTime().toString("dd-MM-yy").toUtf8() + "/qDebug")); + // %{time} should have a padding of 6 so if it takes less than 10 seconds to show // the first message, there should be 5 spaces QTest::newRow("time-process") << "<%{time process}>%{message}" << true << (QList<QByteArray>() |