Skip to content

Commit

Permalink
update rust-test-workspace-location
Browse files Browse the repository at this point in the history
  • Loading branch information
brotzeit committed Jan 30, 2022
1 parent a5b3660 commit 63a6ba6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/rustic-workspace-test.el
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
;; -*- lexical-binding: t -*-
;; Before editing, eval (load-file "test-helper.el")

(ert-deftest rust-test-workspace-location ()
(ert-deftest rust-test-workspace-crate-location ()
(should (equal (funcall rustic-compile-directory-method) default-directory))
(let* ((test-workspace (expand-file-name "test/test-project/test-workspace/" default-directory))
(default-directory test-workspace))
(should (equal (funcall rustic-compile-directory-method) test-workspace))))
(let* ((test-workspace (expand-file-name "test/test-project/"))
(test-crate (expand-file-name "test/test-project/crates/test-crate/")))
(let ((default-directory (expand-file-name "src" test-crate)))
(should (string= (rustic-buffer-workspace) test-workspace))
(should (string= (rustic-buffer-crate) test-crate)))))

;; just test if project-root function works for different versions
(ert-deftest rust-test-project-root ()
Expand Down

0 comments on commit 63a6ba6

Please sign in to comment.