refactor!: restructure Doom core
BREAKING CHANGE: This restructures the project in preparation for Doom to be split into two repos. Users that have reconfigured Doom's CLI stand a good chance of seeing breakage, especially if they've referred to any core-* feature, e.g. (after! core-cli-ci ...) To fix it, simply s/core-/doom-/, i.e. (after! doom-cli-ci ...) What this commit specifically changes is: - Renames all core features from core-* to doom-* - Moves core/core-* -> lisp/doom-* - Moves core/autoloads/* -> lisp/lib/* - Moves core/templates -> templates/ Ref: #4273
This commit is contained in:
parent
a9866e37e4
commit
b9933e6637
69 changed files with 147 additions and 145 deletions
40
test/test-core-projects.el
Normal file
40
test/test-core-projects.el
Normal file
|
@ -0,0 +1,40 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; core/test/test-core-projects.el
|
||||
|
||||
(describe "core/projects"
|
||||
:var (projectile-enable-caching)
|
||||
|
||||
(require 'core-projects)
|
||||
(require 'projectile)
|
||||
|
||||
(before-each
|
||||
(setq projectile-enable-caching nil)
|
||||
(projectile-mode +1))
|
||||
(after-each
|
||||
(projectile-mode -1))
|
||||
|
||||
(describe "project-p"
|
||||
(it "Should detect when in a valid project"
|
||||
(expect (doom-project-p doom-emacs-dir)))
|
||||
(it "Should detect when not in a valid project"
|
||||
(expect (doom-project-p (expand-file-name "~")) :to-be nil)))
|
||||
|
||||
(describe "project-root"
|
||||
(it "should resolve to the project's root"
|
||||
(expect (doom-project-root doom-core-dir) :to-equal-file doom-emacs-dir))
|
||||
(it "should return nil if not in a project"
|
||||
(expect (doom-project-root (expand-file-name "~")) :to-be nil)))
|
||||
|
||||
(describe "project-expand"
|
||||
(it "expands to a path relative to the project root"
|
||||
(expect (doom-project-expand "init.el" doom-core-dir) :to-equal-file
|
||||
(expand-file-name "init.el" (doom-project-root doom-core-dir)))))
|
||||
|
||||
(describe "project-file-exists-p!"
|
||||
(let ((default-directory doom-core-dir))
|
||||
;; Resolve from project root
|
||||
(expect (project-file-exists-p! "init.el"))
|
||||
;; Chained file checks
|
||||
(expect (project-file-exists-p! (and "init.el" "LICENSE")))
|
||||
(expect (project-file-exists-p! (or "init.el" "does-not-exist")))
|
||||
(expect (project-file-exists-p! (and "init.el" (or "LICENSE" "does-not-exist")))))))
|
Loading…
Add table
Add a link
Reference in a new issue