Skip to content

Commit 954221f

Browse files
committed
Define rust-test-project-located' conditionally instead of using skip-unless'.
1 parent d2bb17c commit 954221f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rust-mode-tests.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2650,12 +2650,12 @@ extern \"rust-intrinsic\" fn five() {
26502650
"four"
26512651
"five"))))
26522652

2653-
(ert-deftest rust-test-project-located ()
2654-
(skip-unless (executable-find "cargo"))
2655-
(lexical-let* ((test-dir (expand-file-name "test-project" default-directory))
2656-
(manifest-file (expand-file-name "Cargo.toml" test-dir)))
2657-
(let ((default-directory test-dir))
2658-
(should (equal (expand-file-name (rust-buffer-project)) manifest-file)))))
2653+
(when (executable-find rust-cargo-bin)
2654+
(ert-deftest rust-test-project-located ()
2655+
(lexical-let* ((test-dir (expand-file-name "test-project" default-directory))
2656+
(manifest-file (expand-file-name "Cargo.toml" test-dir)))
2657+
(let ((default-directory test-dir))
2658+
(should (equal (expand-file-name (rust-buffer-project)) manifest-file))))))
26592659

26602660
;; If electric-pair-mode is available, load it and run the tests that use it. If not,
26612661
;; no error--the tests will be skipped.

0 commit comments

Comments
 (0)