| 333 | } |
| 334 | |
| 335 | void DebuggerTestBase::testRunDebuggerScript() |
| 336 | { |
| 337 | auto* const session = createTestDebugSession(); |
| 338 | |
| 339 | QTemporaryFile runScript; |
| 340 | |
| 341 | const auto makeScriptContents = [this] { |
| 342 | if (isLldb()) { |
| 343 | return QLatin1String{"break set --file %1 --line 28\n"}.arg(debugeeFilePath()); |
| 344 | } else { |
| 345 | return QLatin1String{R"(file %1 |
| 346 | break main |
| 347 | run |
| 348 | )"} |
| 349 | .arg(KShell::quoteArg(findExecutable("debuggee_debugee").toLocalFile())); |
| 350 | } |
| 351 | }; |
| 352 | OPEN_WRITE_AND_CLOSE_TEMPORARY_FILE(runScript, makeScriptContents()); |
| 353 | |
| 354 | TestLaunchConfiguration cfg; |
| 355 | cfg.config().writeEntry(runScriptEntryKey(), QUrl::fromLocalFile(runScript.fileName())); |
| 356 | |
| 357 | const ActiveStateSessionSpy sessionSpy(session); |
| 358 | START_DEBUGGING_AND_WAIT_FOR_PAUSED_STATE_E(session, cfg, sessionSpy); |
| 359 | QCOMPARE(currentMiLine(session), 28); |
| 360 | |
| 361 | session->run(); |
| 362 | WAIT_FOR_STATE(session, IDebugSession::EndedState); |
| 363 | } |
| 364 | |
| 365 | void DebuggerTestBase::testUnsupportedUrlExpressionBreakpoints() |
| 366 | { |
nothing calls this directly
no test coverage detected