diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-03-24 07:37:43 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-03-24 07:38:02 +0100 |
commit | 135ebe4f3d268121047fdbfee49f2dd52006165e (patch) | |
tree | 6b303103f36e69e29cfa860b8b7afc584c55d6f3 /tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp | |
parent | e7feb956280105113b3e58f12e5f32f54199a95a (diff) | |
parent | 1e8f50a8d069c97ea6a4f00d664c12e594884f54 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: If5d2e621c2fa5476c3ab687a3f4620c54fc3b32e
Diffstat (limited to 'tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp')
-rw-r--r-- | tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp index 63d07a7ce3..aa7a3762ce 100644 --- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp @@ -187,7 +187,7 @@ private slots: void pos(); void pos2(); void pos3LargeFile(); -#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS) +#if !defined(Q_OS_WINCE) void readStdin(); void readAllFromStdin(); void readLineFromStdin(); @@ -1484,9 +1484,12 @@ void tst_QTextStream::pos3LargeFile() // ------------------------------------------------------------------------------ // Qt/CE has no stdin/out support for processes -#if !defined(Q_OS_WINCE) && !defined(QT_NO_PROCESS) +#if !defined(Q_OS_WINCE) void tst_QTextStream::readStdin() { +#ifdef QT_NO_PROCESS + QSKIP("No qprocess support", SkipAll); +#else QProcess stdinProcess; stdinProcess.start("stdinProcess/stdinProcess"); stdinProcess.setReadChannel(QProcess::StandardError); @@ -1505,12 +1508,16 @@ void tst_QTextStream::readStdin() QCOMPARE(a, 1); QCOMPARE(b, 2); QCOMPARE(c, 3); +#endif } // ------------------------------------------------------------------------------ // Qt/CE has no stdin/out support for processes void tst_QTextStream::readAllFromStdin() { +#ifdef QT_NO_PROCESS + QSKIP("No qprocess support", SkipAll); +#else QProcess stdinProcess; stdinProcess.start("readAllStdinProcess/readAllStdinProcess", QIODevice::ReadWrite | QIODevice::Text); stdinProcess.setReadChannel(QProcess::StandardError); @@ -1523,12 +1530,16 @@ void tst_QTextStream::readAllFromStdin() QVERIFY(stdinProcess.waitForFinished(5000)); QCOMPARE(stream.readAll(), QString::fromLatin1("hello world\n")); +#endif } // ------------------------------------------------------------------------------ // Qt/CE has no stdin/out support for processes void tst_QTextStream::readLineFromStdin() { +#ifdef QT_NO_PROCESS + QSKIP("No qprocess support", SkipAll); +#else QProcess stdinProcess; stdinProcess.start("readLineStdinProcess/readLineStdinProcess", QIODevice::ReadWrite | QIODevice::Text); stdinProcess.setReadChannel(QProcess::StandardError); @@ -1544,6 +1555,7 @@ void tst_QTextStream::readLineFromStdin() stdinProcess.closeWriteChannel(); QVERIFY(stdinProcess.waitForFinished(5000)); +#endif } #endif |