diff options
| -rw-r--r-- | rust-mode-tests.el | 10 |
1 files 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. |
