| 1299 | } |
| 1300 | |
| 1301 | void tst_util::findBinaryInPathReturnedPathIsExecutable() { |
| 1302 | // Verify the returned path satisfies the isExecutable() check that guards |
| 1303 | // the assignment inside the loop. |
| 1304 | #ifdef Q_OS_WIN |
| 1305 | const QString binaryName = QStringLiteral("cmd.exe"); |
| 1306 | #else |
| 1307 | const QString binaryName = QStringLiteral("sh"); |
| 1308 | #endif |
| 1309 | QString result = Util::findBinaryInPath(binaryName); |
| 1310 | QVERIFY2(!result.isEmpty(), "Should find a standard shell"); |
| 1311 | QFileInfo fi(result); |
| 1312 | QVERIFY2( |
| 1313 | fi.isExecutable(), |
| 1314 | qPrintable( |
| 1315 | QStringLiteral("Returned path '%1' must be executable").arg(result))); |
| 1316 | } |
| 1317 | |
| 1318 | void tst_util::findBinaryInPathMultipleKnownBinaries() { |
| 1319 | // Test finding multiple common binaries in PATH. |
nothing calls this directly
no outgoing calls
no test coverage detected