File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -397,7 +397,9 @@ session, the main dispatch dialog is invoked."
397
397
(interactive
398
398
(list (transient-args 'test-cockpit-prefix )))
399
399
(if-let (last-cmd (oref (test-cockpit--real-engine-or-error) last-command))
400
- (test-cockpit--run-test last-cmd)
400
+ (if (eq last-cmd 'test-cockpit--last-command-was-dape )
401
+ (test-cockpit-dape-debug-repeat-test)
402
+ (test-cockpit--run-test last-cmd))
401
403
(test-cockpit-dispatch)))
402
404
403
405
;;;### autoload
@@ -467,9 +469,14 @@ in order to call the last test action with modified ARGS."
467
469
(interactive )
468
470
(if-let
469
471
((config (test-cockpit--dape-debug-last-test)))
470
- (dape config)
472
+ (test-cockpit--launch- dape config)
471
473
(user-error " No recent test-action has been performed or no Dape support for backend" )))
472
474
475
+ (defun test-cockpit--launch-dape (config )
476
+ " Launch the dape debug session and memorize that last test was a dape session."
477
+ (dape config)
478
+ (oset (test-cockpit--retrieve-engine) last-command 'test-cockpit--last-command-was-dape ))
479
+
473
480
(defun test-cockpit--projectile-build (&optional last-cmd )
474
481
" Launch a projectile driven build process.
475
482
If last executed command LAST-CMD is given the command is
Original file line number Diff line number Diff line change 405
405
(test-cockpit-dape-debug-repeat-test)))
406
406
407
407
408
+ (ert-deftest test-dape-debug-repeat-test--repeat ()
409
+ (tc--register-dape-project " dape" )
410
+ (mocker-let ((projectile-project-type () ((:output 'dape-project-type )))
411
+ (dape (config) ((:input '(dape-foo-config) :output 'success :occur 2 ))))
412
+ (test-cockpit-dape-debug-repeat-test)
413
+ (test-cockpit-repeat-test)))
414
+
415
+
408
416
(ert-deftest test-main-suffix--all-nil ()
409
417
(tc--register-foo-project " foo" )
410
418
(mocker-let ((projectile-project-type () ((:output 'foo-project-type )))
You can’t perform that action at this time.
0 commit comments