aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTroy Figiel <troy@troyfigiel.com>2025-12-25 19:27:15 +0100
committerBozhidar Batsov <bozhidar@batsov.dev>2026-01-07 14:57:09 +0200
commitbc61f8a8f38282e73e6e8226dee950f622f15b56 (patch)
tree229468984f17ee35af64a34b0d573a6d8f2a7468 /test
parentb553164f1ede1b9e02ddfdabf87c90f3cfb0e66a (diff)
[Fix #1962] Fix finding other file when candidate is a root file
Diffstat (limited to 'test')
-rw-r--r--test/projectile-test.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/projectile-test.el b/test/projectile-test.el
index 9df08aa..1bfa6b9 100644
--- a/test/projectile-test.el
+++ b/test/projectile-test.el
@@ -1143,7 +1143,10 @@ Just delegates OPERATION and ARGS for all operations except for`shell-command`'.
(it "returns files with same names but different extensions"
(projectile-test-with-sandbox
(projectile-test-with-files-using-custom-project
- ("src/test1.c"
+ ("root.c"
+ "root.h"
+ "src/root.h"
+ "src/test1.c"
"src/test2.c"
"src/test+copying.m"
"src/test1.cpp"
@@ -1153,6 +1156,7 @@ Just delegates OPERATION and ARGS for all operations except for`shell-command`'.
"src/test.frag"
"src/same_name.c"
"src/some_module/same_name.c"
+ "include1/root.h"
"include1/same_name.h"
"include1/test1.h"
"include1/test1.h~"
@@ -1196,6 +1200,7 @@ Just delegates OPERATION and ARGS for all operations except for`shell-command`'.
;; handle files with nested extensions
("service.js" . ("service.spec.js"))
("js" . ("js")))))
+ (expect (projectile-get-other-files "root.c") :to-equal '("root.h" "include1/root.h" "src/root.h"))
(expect (projectile-get-other-files "src/test1.c") :to-equal '("include1/test1.h" "include2/test1.h"))
(expect (projectile-get-other-files "src/test1.cpp") :to-equal '("include1/test1.h" "include2/test1.h" "include1/test1.hpp"))
(expect (projectile-get-other-files "test2.c") :to-equal '("include1/test2.h" "include2/test2.h"))