diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2013-03-27 11:23:28 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-03-27 13:07:26 +0100 |
commit | 4ee2ddbf8630303a5540767d370f9ea852164d24 (patch) | |
tree | 4416290b1617713ca6bbdebf7cd22904763763ec /tests/auto/cmdlineparser | |
parent | d989719fb6eb42a1ebf880a376ff7e929782ccb0 (diff) |
Make commandline parser auto test deterministic.
It no longer depends on whether it is run in a terminal. See comments in
patch for details.
Change-Id: I3802112bdbfdb9f2e1221a4a86d29f422c437c81
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/cmdlineparser')
-rw-r--r-- | tests/auto/cmdlineparser/tst_cmdlineparser.cpp | 4 |
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); |