summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-07-19 14:08:20 -0600
committerGitHub <noreply@github.com>2017-07-19 14:08:20 -0600
commit0985f5fde747f64b3fcff2661226aa4dad286e04 (patch)
tree6d10287cf110b87ee81ae516a89a440b2030d038 /rust-mode-tests.el
parent60a1f36f4111e825d20d9c3aed561981c470806a (diff)
parent128601b687e7802cf28a1eadd292c52303e92d39 (diff)
downloadrust-mode-0985f5fde747f64b3fcff2661226aa4dad286e04.tar.gz
Merge pull request #217 from Aankhen/add-clippy-command
Add `rust-run-clippy' and `rust-buffer-project' with testing paraphernalia
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 6d58906..b1d51c9 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -2650,6 +2650,13 @@ extern \"rust-intrinsic\" fn five() {
"four"
"five"))))
+(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.
(require 'elec-pair nil t)