summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 6d58906..42792ac 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -2650,6 +2650,15 @@ extern \"rust-intrinsic\" fn five() {
"four"
"five"))))
+(ert-deftest rust-test-project-located ()
+ (lexical-let* ((this-dir default-directory)
+ (test-dir (expand-file-name "test-project" this-dir))
+ (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))))
+
;; 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)