emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 954221f 316/486: Define `rust-test-project-locat


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 954221f 316/486: Define `rust-test-project-located' conditionally instead of using `skip-unless'.
Date: Sat, 7 Aug 2021 09:25:43 -0400 (EDT)

branch: elpa/rust-mode
commit 954221f39982a5fe2b60077600c2ed7c8d02c086
Author: Aankhen <Aankhen@users.noreply.github.com>
Commit: Aankhen <Aankhen@users.noreply.github.com>

    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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]