summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
authorAankhen <Aankhen@users.noreply.github.com>2017-06-26 18:46:55 +0530
committerAankhen <Aankhen@users.noreply.github.com>2017-07-13 11:46:06 +0530
commit954221f39982a5fe2b60077600c2ed7c8d02c086 (patch)
tree831ddb20c5d4c51dc02035233d2fc0f3c675890e /rust-mode-tests.el
parentd2bb17ce165242a28c0fe22ae2a98f0ed79d76fe (diff)
downloadrust-mode-954221f39982a5fe2b60077600c2ed7c8d02c086.tar.gz
Define `rust-test-project-located' conditionally instead of using `skip-unless'.
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el12
1 files 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.