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

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

[nongnu] elpa/rust-mode d2bb17c 315/486: Skip `rust-test-project-located


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode d2bb17c 315/486: Skip `rust-test-project-located' without cargo and avoid `find-file' in test.
Date: Sat, 7 Aug 2021 09:25:43 -0400 (EDT)

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

    Skip `rust-test-project-located' without cargo and avoid `find-file' in 
test.
---
 rust-mode-tests.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 42792ac..1e03795 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -2651,13 +2651,11 @@ extern \"rust-intrinsic\" fn five() {
       "five"))))
 
 (ert-deftest rust-test-project-located ()
-  (lexical-let* ((this-dir default-directory)
-                 (test-dir (expand-file-name "test-project" this-dir))
+  (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)))
-    (find-file (expand-file-name "test-project/foo.rs"))
-    (unwind-protect
-        (should (equal (expand-file-name (rust-buffer-project)) manifest-file))
-      (kill-buffer))))
+    (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]