diff options
| author | Aankhen <Aankhen@users.noreply.github.com> | 2017-06-26 18:38:14 +0530 |
|---|---|---|
| committer | Aankhen <Aankhen@users.noreply.github.com> | 2017-07-13 11:46:06 +0530 |
| commit | d2bb17ce165242a28c0fe22ae2a98f0ed79d76fe (patch) | |
| tree | fa386c3717c8e753db8414c77b4e3ac3e7175a14 /rust-mode-tests.el | |
| parent | b4077f8be2163b71b33a12932ef1013874646a9c (diff) | |
| download | rust-mode-d2bb17ce165242a28c0fe22ae2a98f0ed79d76fe.tar.gz | |
Skip `rust-test-project-located' without cargo and avoid `find-file' in test.
Diffstat (limited to 'rust-mode-tests.el')
| -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. |
