File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 44 option. This is handy when you are working on multiple
55 projects. Refer the variable docs and README for more details.
66- Replace Cask with Eask for CI testing.
7+ - Implement ~rustic-cargo-nextest-current-test~ for running test at a
8+ point using nextest.
79
810* 3.5
911
Original file line number Diff line number Diff line change @@ -558,6 +558,8 @@ Commands:
558558- ` rustic-cargo-current-test ` run test at point, whether it's a
559559 function or a module
560560- ` rustic-cargo-run-nextest ` command for running [ nextest] ( https://github.com/nextest-rs/nextest )
561+ - ` rustic-cargo-nextest-current-test ` is the nextest equivalent for
562+ ` rustic-cargo-current-test `
561563
562564![ ] ( https://raw.githubusercontent.com/emacs-rustic/rustic/main/img/cargo_current_test.png )
563565
Original file line number Diff line number Diff line change @@ -184,7 +184,9 @@ stored in this variable.")
184184 (setq-local rustic-compile-rustflags (concat rustic-compile-rustflags " -Awarnings" ))))
185185
186186(defun rustic-cargo-run-nextest (&optional arg )
187- " Command for running nextest."
187+ " Command for running nextest.
188+
189+ If ARG is not nil, get input from minibuffer."
188190 (interactive " P" )
189191 (let* ((nextest (if arg
190192 (read-from-minibuffer " nextest command: " rustic-cargo-nextest-exec-command)
@@ -195,6 +197,17 @@ stored in this variable.")
195197 (mode 'rustic-cargo-test-mode ))
196198 (rustic-compilation c (list :buffer buf :process proc :mode mode))))
197199
200+ (defun rustic-cargo-nextest-current-test ()
201+ " Run 'cargo nextest run' for the test near point."
202+ (interactive )
203+ (rustic-compilation-process-live)
204+ (-if-let (test-to-run (setq rustic-test-arguments
205+ (rustic-cargo--get-test-target)))
206+ (let ((rustic-cargo-nextest-exec-command
207+ (format " %s %s " rustic-cargo-nextest-exec-command test-to-run)))
208+ (rustic-cargo-run-nextest))
209+ (message " Could not find test at point. " )))
210+
198211;;;### autoload
199212(defun rustic-cargo-test-run (&optional test-args )
200213 " Start compilation process for 'cargo test' with optional TEST-ARGS."
You can’t perform that action at this time.
0 commit comments