aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/cmdlineparser/tst_cmdlineparser.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-10-30 10:23:46 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-11-07 14:37:24 +0000
commit659df2d72645548ffe70b54a22ebe09d12402806 (patch)
tree0d1738731001ec80d2e31f5cf6f3ff6cb5fbb7fb /tests/auto/cmdlineparser/tst_cmdlineparser.cpp
parent658fca829cc6d2e65d869315150e91a43847f5b3 (diff)
CLI: Allow to mix options and property assignments
The strict separation we had before was annoying to users wanting to add options to a previous command line using the shell history, because the new option could not simply be appended if any property assignments were present. [ChangeLog] Command-line options do not have to precede property assignments anymore. Change-Id: I46fab716b2ff045adaf138db5194c3eba5b6818b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/cmdlineparser/tst_cmdlineparser.cpp')
-rw-r--r--tests/auto/cmdlineparser/tst_cmdlineparser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/cmdlineparser/tst_cmdlineparser.cpp b/tests/auto/cmdlineparser/tst_cmdlineparser.cpp
index 1d4bcd7a5..f3186a587 100644
--- a/tests/auto/cmdlineparser/tst_cmdlineparser.cpp
+++ b/tests/auto/cmdlineparser/tst_cmdlineparser.cpp
@@ -100,7 +100,7 @@ private slots:
QCOMPARE(ConsoleLogger::instance().logSink()->logLevel(), LoggerTrace);
// Second "global" profile overwrites first.
- QVERIFY(parser.parseCommandLine(QStringList(fileArgs) << "profile:a" << "profile:b"));
+ QVERIFY(parser.parseCommandLine(QStringList() << "profile:a" << fileArgs << "profile:b"));
QCOMPARE(parser.buildConfigurations().count(), 1);
QCOMPARE(parser.buildConfigurations().first().value("qbs.profile").toString(), QLatin1String("b"));
@@ -123,8 +123,8 @@ private slots:
<< "config:debug" << "profile:a"));
QCOMPARE(parser.buildConfigurations().count(), 1);
- QVERIFY(parser.parseCommandLine(QStringList(fileArgs) << "config:debug" << "profile:a"
- << "config:release" << "profile:b"));
+ QVERIFY(parser.parseCommandLine(QStringList() << "config:debug" << "profile:a"
+ << "config:release" << "profile:b" << fileArgs));
QCOMPARE(parser.buildConfigurations().count(), 2);
QCOMPARE(parser.buildConfigurations().first().value("qbs.configurationName").toString(), QLatin1String("debug"));
QCOMPARE(parser.buildConfigurations().first().value("qbs.profile").toString(), QLatin1String("a"));
@@ -145,8 +145,8 @@ private slots:
QCOMPARE(parser.buildOptions(QString()).maxJobCount(), 123);
// Argument list separation for the "run" command.
- QVERIFY(parser.parseCommandLine(QStringList("run") << fileArgs << "-j" << "123"
- << "config:custom"));
+ QVERIFY(parser.parseCommandLine(QStringList("run") << fileArgs << "config:custom"
+ << "-j123"));
QCOMPARE(parser.command(), RunCommandType);
QCOMPARE(parser.buildOptions(QString()).maxJobCount(), 123);
QCOMPARE(parser.buildConfigurations().first().value("qbs.configurationName").toString(),