branch: elpa/rust-mode
commit 954221f39982a5fe2b60077600c2ed7c8d02c086
Author: Aankhen <[email protected]>
Commit: Aankhen <[email protected]>
Define `rust-test-project-located' conditionally instead of using
`skip-unless'.
---
rust-mode-tests.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 1e03795..b1d51c9 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -2650,12 +2650,12 @@ extern \"rust-intrinsic\" fn five() {
"four"
"five"))))
-(ert-deftest rust-test-project-located ()
- (skip-unless (executable-find "cargo"))
- (lexical-let* ((test-dir (expand-file-name "test-project" default-directory))
- (manifest-file (expand-file-name "Cargo.toml" test-dir)))
- (let ((default-directory test-dir))
- (should (equal (expand-file-name (rust-buffer-project))
manifest-file)))))
+(when (executable-find rust-cargo-bin)
+ (ert-deftest rust-test-project-located ()
+ (lexical-let* ((test-dir (expand-file-name "test-project"
default-directory))
+ (manifest-file (expand-file-name "Cargo.toml" test-dir)))
+ (let ((default-directory test-dir))
+ (should (equal (expand-file-name (rust-buffer-project))
manifest-file))))))
;; If electric-pair-mode is available, load it and run the tests that use it.
If not,
;; no error--the tests will be skipped.