diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-22 12:16:22 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-22 12:16:22 (GMT) |
commit | 5ef9227a5931e87cd18354967013056ef59405ca (patch) | |
tree | dea07caa94be3b92702951813d373120cee81071 /tests/auto | |
parent | e3994b506c21b9967248ea404cfdfef82060c13e (diff) | |
parent | 6c25a7cdea912f212ce00f43c7cfc862c1ecdd50 (diff) | |
download | Qt-5ef9227a5931e87cd18354967013056ef59405ca.zip Qt-5ef9227a5931e87cd18354967013056ef59405ca.tar.gz Qt-5ef9227a5931e87cd18354967013056ef59405ca.tar.bz2 |
Merge commit 'origin/4.5'
Conflicts:
src/gui/graphicsview/qgraphicsscene.cpp
src/gui/kernel/qt_cocoa_helpers_mac_p.h
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qprocess/tst_qprocess.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/qprocess/tst_qprocess.cpp b/tests/auto/qprocess/tst_qprocess.cpp index d235dff..1ae5b12 100644 --- a/tests/auto/qprocess/tst_qprocess.cpp +++ b/tests/auto/qprocess/tst_qprocess.cpp @@ -147,6 +147,7 @@ private slots: void startFinishStartFinish(); void invalidProgramString_data(); void invalidProgramString(); + void processEventsInAReadyReadSlot(); // keep these at the end, since they use lots of processes and sometimes // caused obscure failures to occur in tests that followed them (esp. on the Mac) @@ -160,6 +161,7 @@ protected slots: void restartProcess(); void waitForReadyReadInAReadyReadSlotSlot(); void waitForBytesWrittenInABytesWrittenSlotSlot(); + void processEventsInAReadyReadSlotSlot(); private: QProcess *process; @@ -2134,6 +2136,35 @@ void tst_QProcess::invalidProgramString() QVERIFY(!QProcess::startDetached(programString)); } +//----------------------------------------------------------------------------- +void tst_QProcess::processEventsInAReadyReadSlot() +{ +#ifdef Q_OS_WINCE + QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll); +#endif + + QProcess process; + QVERIFY(QObject::connect(&process, SIGNAL(readyReadStandardOutput()), this, SLOT(processEventsInAReadyReadSlotSlot()))); + + for (int i = 0; i < 10; ++i) { + QCOMPARE(process.state(), QProcess::NotRunning); + +#ifdef Q_OS_MAC + process.start("testProcessOutput/testProcessOutput.app"); +#else + process.start("testProcessOutput/testProcessOutput"); +#endif + + QVERIFY(process.waitForFinished(10000)); + } +} + +//----------------------------------------------------------------------------- +void tst_QProcess::processEventsInAReadyReadSlotSlot() +{ + qApp->processEvents(); +} + QTEST_MAIN(tst_QProcess) #include "tst_qprocess.moc" #endif |