diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-07-02 15:38:10 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-07-06 12:10:47 (GMT) |
commit | 92b6ca830f279cfa9d37946f1fd72843b24e704b (patch) | |
tree | 5d7d5751b0dec7f37a75d1322304f2b4d8b52cf5 /tests/auto | |
parent | 4ebff202b44bb751a1c37db13963362592e86a6d (diff) | |
download | Qt-92b6ca830f279cfa9d37946f1fd72843b24e704b.zip Qt-92b6ca830f279cfa9d37946f1fd72843b24e704b.tar.gz Qt-92b6ca830f279cfa9d37946f1fd72843b24e704b.tar.bz2 |
fix bogus return value from qprocess::execute()
Task-number: QTBUG-230, QTBUG-5866
Reviewed-by: joerg
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qprocess/tst_qprocess.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qprocess/tst_qprocess.cpp b/tests/auto/qprocess/tst_qprocess.cpp index 8dae9a0..8242d30 100644 --- a/tests/auto/qprocess/tst_qprocess.cpp +++ b/tests/auto/qprocess/tst_qprocess.cpp @@ -93,6 +93,7 @@ private slots: void getSetCheck(); void constructing(); void simpleStart(); + void execute(); void startDetached(); void crashTest(); void crashTest2(); @@ -284,6 +285,14 @@ void tst_QProcess::simpleStart() QCOMPARE(qVariantValue<QProcess::ProcessState>(spy.at(2).at(0)), QProcess::NotRunning); } //----------------------------------------------------------------------------- +void tst_QProcess::execute() +{ + QCOMPARE(QProcess::execute("testProcessNormal/testProcessNormal", + QStringList() << "arg1" << "arg2"), 0); + QCOMPARE(QProcess::execute("nonexistingexe"), -2); +} + +//----------------------------------------------------------------------------- void tst_QProcess::startDetached() { QProcess proc; |