aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/cmdlineparser
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/cmdlineparser')
-rw-r--r--tests/auto/cmdlineparser/tst_cmdlineparser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/cmdlineparser/tst_cmdlineparser.cpp b/tests/auto/cmdlineparser/tst_cmdlineparser.cpp
index 2c9c70f62..935d1c75e 100644
--- a/tests/auto/cmdlineparser/tst_cmdlineparser.cpp
+++ b/tests/auto/cmdlineparser/tst_cmdlineparser.cpp
@@ -82,9 +82,11 @@ private slots:
QVERIFY(parser.parseCommandLine(QStringList() << "-t" << fileArgs, settings.data()));
QVERIFY(parser.logTime());
+ // Note: We cannot just check for !parser.logTime() here, because if the test is not
+ // run in a terminal, "--show-progress" is ignored, in which case "--log-time" takes effect.
QVERIFY(parser.parseCommandLine(QStringList() << "-t" << "--show-progress" << fileArgs,
settings.data()));
- QVERIFY(!parser.logTime());
+ QVERIFY(parser.showProgress() != parser.logTime());
QVERIFY(parser.parseCommandLine(QStringList() << "-vvqqq" << fileArgs, settings.data()));
QCOMPARE(ConsoleLogger::instance().logSink()->logLevel(), LoggerWarning);