| 47 | using namespace KDevelop; |
| 48 | |
| 49 | void validatingExecJob(VcsJob* j, VcsJob::JobStatus status = VcsJob::JobSucceeded) |
| 50 | { |
| 51 | QVERIFY(j); |
| 52 | // Print the commands in full, for easier bug location |
| 53 | #if 0 |
| 54 | if (QLatin1String(j->metaObject()->className()) == "DVcsJob") { |
| 55 | qDebug() << "Command: \"" << ((DVcsJob*)j)->getChildproc()->program() << ((DVcsJob*)j)->getChildproc()->workingDirectory(); |
| 56 | qDebug() << "Output: \"" << ((DVcsJob*)j)->output(); |
| 57 | } |
| 58 | #endif |
| 59 | |
| 60 | if (!j->exec()) { |
| 61 | qDebug() << "ooops, no exec"; |
| 62 | qDebug() << j->errorString(); |
| 63 | // On error, wait for key in order to allow manual state inspection |
| 64 | #if 0 |
| 65 | char c; |
| 66 | std::cin.read(&c, 1); |
| 67 | #endif |
| 68 | } |
| 69 | |
| 70 | QCOMPARE(j->status(), status); |
| 71 | } |
| 72 | |
| 73 | void verifiedWrite(QUrl const & url, QString const & contents) |
| 74 | { |
no test coverage detected