summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qprocess/tst_qprocess.cpp')
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index d248f022ed..37f224ff28 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -93,6 +93,7 @@ private slots:
void echoTest2();
#ifdef Q_OS_WIN
void echoTestGui();
+ void testSetNamedPipeHandleState();
void batFiles_data();
void batFiles();
#endif
@@ -538,7 +539,6 @@ void tst_QProcess::echoTest2()
#endif
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-//Batch files are not supported on Winfows CE
// Reading and writing to a process is not supported on Qt/CE
//-----------------------------------------------------------------------------
void tst_QProcess::echoTestGui()
@@ -556,11 +556,22 @@ void tst_QProcess::echoTestGui()
QCOMPARE(process.readAllStandardOutput(), QByteArray("Hello"));
QCOMPARE(process.readAllStandardError(), QByteArray("Hello"));
}
+
+void tst_QProcess::testSetNamedPipeHandleState()
+{
+ QProcess process;
+ process.setProcessChannelMode(QProcess::SeparateChannels);
+ process.start("testSetNamedPipeHandleState/testSetNamedPipeHandleState");
+ QVERIFY2(process.waitForStarted(5000), qPrintable(process.errorString()));
+ QVERIFY(process.waitForFinished(5000));
+ QCOMPARE(process.exitCode(), 0);
+ QCOMPARE(process.exitStatus(), QProcess::NormalExit);
+}
#endif // !Q_OS_WINCE && Q_OS_WIN
//-----------------------------------------------------------------------------
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-//Batch files are not supported on Winfows CE
+// Batch files are not supported on Windows CE
void tst_QProcess::batFiles_data()
{
QTest::addColumn<QString>("batFile");