diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2012-10-09 12:46:58 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2012-10-09 15:01:29 +0200 |
commit | 67a00779193dd33e9bccc34166049dc8b5e7f4ed (patch) | |
tree | 222e6ceaaf68c61fc12c37978b8216d55b90ecce /tests/auto/tools/tst_tools.cpp | |
parent | e91a5a73cfc8c11e0384817b9dd2cf78766a1e9a (diff) |
Improve command line parsing.
- Remove unsupported option "-g".
- Internationalize error messages.
- Don't silently fail in case of invalid "-j" option.
Change-Id: Ia4835097547e1bd99f2ad65b069f678a116319a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/tools/tst_tools.cpp')
-rw-r--r-- | tests/auto/tools/tst_tools.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/tools/tst_tools.cpp b/tests/auto/tools/tst_tools.cpp index aa09f163c..49e3e47c7 100644 --- a/tests/auto/tools/tst_tools.cpp +++ b/tests/auto/tools/tst_tools.cpp @@ -43,8 +43,8 @@ private slots: args.append("-vvv"); args.append("-k"); qbs::CommandLineOptions options; - options.readCommandLineArguments(args); - QCOMPARE(qbs::Logger::instance().level(), qbs::LoggerInfo); + options.parseCommandLine(args); + QCOMPARE(qbs::Logger::instance().level(), qbs::LoggerDebug); QCOMPARE(options.command(), qbs::CommandLineOptions::BuildCommand); QVERIFY(options.isKeepGoingSet()); } @@ -75,13 +75,13 @@ private slots: qbs::CommandLineOptions options; const QStringList args(QLatin1String("-f")); QString projectFilePath = multiProjectsDir + QLatin1String("/project.qbp"); - QVERIFY(options.readCommandLineArguments(args + QStringList(projectFilePath))); + QVERIFY(options.parseCommandLine(args + QStringList(projectFilePath))); QCOMPARE(projectFilePath, options.projectFileName()); projectFilePath = oneProjectDir + QLatin1String("/project.qbp"); - QVERIFY(options.readCommandLineArguments(args + QStringList(oneProjectDir))); + QVERIFY(options.parseCommandLine(args + QStringList(oneProjectDir))); QCOMPARE(projectFilePath, options.projectFileName()); - QVERIFY(!options.readCommandLineArguments(args + QStringList(noProjectsDir))); - QVERIFY(!options.readCommandLineArguments(args + QStringList(multiProjectsDir))); + QVERIFY(!options.parseCommandLine(args + QStringList(noProjectsDir))); + QVERIFY(!options.parseCommandLine(args + QStringList(multiProjectsDir))); } }; |