aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@toptal.com>2026-04-26 07:09:36 +0100
committerBozhidar Batsov <bozhidar@toptal.com>2026-04-26 07:09:36 +0100
commit183023602f1002f39d6e5c82ca44a317d6b517fe (patch)
tree0fc665f9a5cd458e78fe0c25f28f63614a2bb458 /test
parent6bb29099114cf68077c4a15f1bde1b323cba5fe6 (diff)
Use cons cells as projectile-project-root-cache keys
Per-function entries are now keyed on (FUNC . DIR), and the overall failure marker on ('none . DIR), instead of formatted strings. Same equal semantics, no per-call format allocation, and lambda functions in projectile-project-root-functions hash by identity instead of by their printed repr.
Diffstat (limited to 'test')
-rw-r--r--test/projectile-test.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/projectile-test.el b/test/projectile-test.el
index b62224a..f099d5f 100644
--- a/test/projectile-test.el
+++ b/test/projectile-test.el
@@ -1236,7 +1236,7 @@ Just delegates OPERATION and ARGS for all operations except for`shell-command`'.
("projectA/src/")
(let* ((projectile-project-root-functions '())
(dir "projectA/src")
- (cache-key (format "projectilerootless-%s" dir))
+ (cache-key (cons 'none dir))
(projectile-project-root-cache (make-hash-table :test 'equal)))
(expect (gethash cache-key projectile-project-root-cache) :to-be nil)
(expect (projectile-project-root dir) :to-be nil)
@@ -1257,7 +1257,7 @@ Just delegates OPERATION and ARGS for all operations except for`shell-command`'.
(lambda (&rest args) (eql 1 (length args)))))
(let* ((projectile-project-root-functions '())
(dir "projectA/src")
- (cache-key (format "projectilerootless-%s" dir))
+ (cache-key (cons 'none dir))
(projectile-project-root-cache (make-hash-table :test 'equal)))
(expect (gethash cache-key projectile-project-root-cache) :to-be nil)
(expect (projectile-project-root dir) :to-be nil)