Skip to content

Commit

Permalink
Define rust-test-project-located' conditionally instead of using sk…
Browse files Browse the repository at this point in the history
…ip-unless'.
  • Loading branch information
Aankhen committed Jul 13, 2017
1 parent d2bb17c commit 954221f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rust-mode-tests.el
Expand Up @@ -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.
Expand Down

0 comments on commit 954221f

Please sign in to comment.